Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc4c780 commit 77105f6Copy full SHA for 77105f6
2 files changed
javascript/ql/src/Expressions/MissingAwait.ql
@@ -43,7 +43,10 @@ predicate isBadPromiseContext(Expr expr) {
43
or
44
expr = any(LogicalBinaryExpr e).getLeftOperand()
45
46
- expr = any(UnaryExpr e).getOperand()
+ exists(UnaryExpr e |
47
+ expr = e.getOperand() and
48
+ not e instanceof VoidExpr
49
+ )
50
51
expr = any(UpdateExpr e).getOperand()
52
javascript/ql/test/query-tests/Expressions/MissingAwait/tst.js
@@ -61,3 +61,7 @@ function useThingPossiblySync(b) {
61
62
return thing + "bar"; // NOT OK - but we don't flag it
63
}
64
+
65
+function useThingInVoid() {
66
+ void getThing(); // OK
67
+}
0 commit comments