Skip to content

Commit d63b094

Browse files
committed
C++: Use ConditionDeclExpr in AnalysedExpr::isDef
1 parent 2ceb25d commit d63b094

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/lib/semmle/code/cpp/controlflow/Nullness.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ class AnalysedExpr extends Expr {
171171
this.inCondition() and
172172
(
173173
this.(Assignment).getLValue() = v.getAnAccess() or
174-
exists(Initializer i | this.getEnclosingStmt() = i.getEnclosingStmt() and v = i.getDeclaration())
175-
)
174+
this.(ConditionDeclExpr).getVariableAccess() = v.getAnAccess()
175+
)
176176
}
177177

178178
/**

0 commit comments

Comments
 (0)