JS: Do not flag void operands MissingAwait

This commit is contained in:
Asger Feldthaus
2020-02-19 09:30:03 +00:00
parent cc4c780573
commit 77105f6572
2 changed files with 8 additions and 1 deletions

View File

@@ -43,7 +43,10 @@ predicate isBadPromiseContext(Expr expr) {
or
expr = any(LogicalBinaryExpr e).getLeftOperand()
or
expr = any(UnaryExpr e).getOperand()
exists(UnaryExpr e |
expr = e.getOperand() and
not e instanceof VoidExpr
)
or
expr = any(UpdateExpr e).getOperand()
or