We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edc9e23 commit 6c069ffCopy full SHA for 6c069ff
cpp/ql/src/semmle/code/cpp/commons/VoidContext.qll
@@ -36,6 +36,8 @@ private predicate exprInVoidContext(Expr e) {
36
exists(CommaExpr c | c.getLeftOperand() = e)
37
or
38
exists(CommaExpr c | c.getRightOperand() = e and c instanceof ExprInVoidContext)
39
+ or
40
+ exists(ForStmt for | for.getUpdate() = e)
41
) and
42
not e.getActualType() instanceof VoidType
43
}
0 commit comments