mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
Merge pull request #2189 from jbj/eivc-2019
C++: Minor tweaks to ExprInVoidContext
This commit is contained in:
@@ -35,7 +35,8 @@ private predicate exprInVoidContext(Expr e) {
|
||||
exists(CommaExpr c | c.getLeftOperand() = e)
|
||||
or
|
||||
exists(CommaExpr c | c.getRightOperand() = e and c instanceof ExprInVoidContext)
|
||||
or
|
||||
exists(ForStmt for | for.getUpdate() = e)
|
||||
) and
|
||||
not e instanceof Qualifier and
|
||||
not e.getActualType() instanceof VoidType
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user