There was an error while loading. Please reload this page.
1 parent e1efdd7 commit 629d127Copy full SHA for 629d127
1 file changed
cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql
@@ -12,11 +12,17 @@
12
13
import cpp
14
15
+/**
16
+ * Gets a `do` ... `while` loop with a constant false condition.
17
+ */
18
DoStmt getAFalseLoop() {
19
result.getControllingExpr().getValue() = "0"
20
and not result.getControllingExpr().isAffectedByMacro()
21
}
22
23
24
+ * Gets a `do` ... `while` loop surrounding a statement.
25
26
DoStmt enclosingLoop(Stmt s) {
27
exists(Stmt parent |
28
parent = s.getParent() and
0 commit comments