mirror of
https://github.com/github/codeql.git
synced 2026-03-28 02:08:17 +01:00
14 lines
397 B
Plaintext
14 lines
397 B
Plaintext
/**
|
|
* @name dostmt02
|
|
* @description The body of the do statement in normal is a successor of the condition.
|
|
*/
|
|
|
|
import cpp
|
|
|
|
from DoStmt ds
|
|
where
|
|
ds.getEnclosingFunction().hasName("normal")
|
|
and ds.getStmt() = ds.getCondition().getASuccessor()
|
|
and ds.getStmt() = ds.getCondition().getATrueSuccessor()
|
|
and count(ds.getCondition().getATrueSuccessor()) = 1
|
|
select ds.getCondition(), ds.getStmt() |