Merge pull request #2189 from jbj/eivc-2019

C++: Minor tweaks to ExprInVoidContext
This commit is contained in:
Geoffrey White
2019-10-24 16:50:35 +01:00
committed by GitHub

View File

@@ -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
}