Skip to content

Commit 73c677d

Browse files
authored
Merge pull request #2189 from jbj/eivc-2019
C++: Minor tweaks to ExprInVoidContext
2 parents c927a4c + 73e217a commit 73c677d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/semmle/code/cpp/commons/VoidContext.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ private predicate exprInVoidContext(Expr e) {
3535
exists(CommaExpr c | c.getLeftOperand() = e)
3636
or
3737
exists(CommaExpr c | c.getRightOperand() = e and c instanceof ExprInVoidContext)
38+
or
39+
exists(ForStmt for | for.getUpdate() = e)
3840
) and
39-
not e instanceof Qualifier and
4041
not e.getActualType() instanceof VoidType
4142
}

0 commit comments

Comments
 (0)