mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Some files that will change in #1736 have been spared. ./build -j4 target/jars/qlformat find ql/cpp/ql -name "*.ql" -print0 | xargs -0 target/jars/qlformat --input find ql/cpp/ql -name "*.qll" -print0 | xargs -0 target/jars/qlformat --input (cd ql && git checkout 'cpp/ql/src/semmle/code/cpp/ir/implementation/**/*SSA*.qll') buildutils-internal/scripts/pr-checks/sync-identical-files.py --latest
17 lines
507 B
Plaintext
17 lines
507 B
Plaintext
/**
|
|
* @name whilestmt01
|
|
* @description The statement following the while statement in normal is a successor of the condition.
|
|
*/
|
|
|
|
import cpp
|
|
|
|
from WhileStmt ws, int k, LabelStmt l
|
|
where
|
|
ws.getEnclosingFunction().hasName("normal") and
|
|
ws.getParentStmt().hasChild(ws, k) and
|
|
ws.getParentStmt().hasChild(l, k + 1) and
|
|
l = ws.getCondition().getASuccessor() and
|
|
l = ws.getCondition().getAFalseSuccessor() and
|
|
count(ws.getCondition().getAFalseSuccessor()) = 1
|
|
select ws.getCondition(), l.getName()
|