mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
14 lines
285 B
Plaintext
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 |