CPP: QLDoc comments.

This commit is contained in:
Geoffrey White
2019-07-05 11:28:47 +01:00
parent e1efdd7d47
commit 629d127174

View File

@@ -12,11 +12,17 @@
import cpp
/**
* Gets a `do` ... `while` loop with a constant false condition.
*/
DoStmt getAFalseLoop() {
result.getControllingExpr().getValue() = "0"
and not result.getControllingExpr().isAffectedByMacro()
}
/**
* Gets a `do` ... `while` loop surrounding a statement.
*/
DoStmt enclosingLoop(Stmt s) {
exists(Stmt parent |
parent = s.getParent() and