mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
CPP: Remove a redundant line.
This commit is contained in:
@@ -11,17 +11,16 @@
|
||||
*/
|
||||
import cpp
|
||||
|
||||
predicate parameterWithDefault(MemberFunction f, int ix, Parameter p, Expr initExpr, string initValue) {
|
||||
predicate memberParameterWithDefault(MemberFunction f, int ix, Parameter p, Expr initExpr, string initValue) {
|
||||
f.getParameter(ix) = p and
|
||||
p.hasInitializer() and
|
||||
initExpr = p.getInitializer().getExpr() and
|
||||
initValue = initExpr.getValue()
|
||||
}
|
||||
|
||||
from Parameter p, Parameter superP, MemberFunction subF, MemberFunction superF, int i, Expr subExpr, string subValue, string superValue
|
||||
where parameterWithDefault(subF, i, p, subExpr, subValue)
|
||||
where memberParameterWithDefault(subF, i, p, subExpr, subValue)
|
||||
and subF.overrides(superF)
|
||||
and parameterWithDefault(superF, i, superP, _, superValue)
|
||||
and memberParameterWithDefault(superF, i, superP, _, superValue)
|
||||
and subValue != superValue
|
||||
select subExpr,
|
||||
"Parameter " + p.getName() +
|
||||
|
||||
Reference in New Issue
Block a user