Skip to content

Commit 629d127

Browse files
committed
CPP: QLDoc comments.
1 parent e1efdd7 commit 629d127

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@
1212

1313
import cpp
1414

15+
/**
16+
* Gets a `do` ... `while` loop with a constant false condition.
17+
*/
1518
DoStmt getAFalseLoop() {
1619
result.getControllingExpr().getValue() = "0"
1720
and not result.getControllingExpr().isAffectedByMacro()
1821
}
1922

23+
/**
24+
* Gets a `do` ... `while` loop surrounding a statement.
25+
*/
2026
DoStmt enclosingLoop(Stmt s) {
2127
exists(Stmt parent |
2228
parent = s.getParent() and

0 commit comments

Comments
 (0)