We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74ff579 commit 4379aa4Copy full SHA for 4379aa4
cpp/ql/lib/semmle/code/cpp/controlflow/Nullness.qll
@@ -169,7 +169,10 @@ class AnalysedExpr extends Expr {
169
*/
170
predicate isDef(LocalScopeVariable v) {
171
this.inCondition() and
172
- this.(Assignment).getLValue() = v.getAnAccess()
+ (
173
+ this.(Assignment).getLValue() = v.getAnAccess() or
174
+ exists(Initializer i | this.getEnclosingStmt() = i.getEnclosingStmt() and v = i.getDeclaration())
175
+ )
176
}
177
178
/**
0 commit comments