Files
codeql/cpp/ql/test/successor-tests/whilestmt/whilestmt05.ql
2018-08-02 17:53:23 +01:00

14 lines
285 B
Plaintext

/**
* @name whilestmt05
* @description The unique successor each while statement is its condition or one of the condition's descendants.
*/
import cpp
from WhileStmt ws
where not
(
ws.getCondition().getAChild*() = ws.getASuccessor()
and count(ws.getASuccessor()) = 1
)
select ws