mirror of
https://github.com/github/codeql.git
synced 2026-05-21 14:47:10 +02:00
These use the annotated, self-verifying test files to check various consistency requirements. Some of these may be expressing the same thing in different ways, but it's fairly cheap to keep them around, so I have not attempted to produce a minimal set of queries for this.
18 lines
557 B
Plaintext
18 lines
557 B
Plaintext
/**
|
|
* Checks that every live (non-dead) annotation in the test function's
|
|
* own scope is reachable from the function entry in the CFG.
|
|
* Annotations in nested scopes (generators, async, lambdas, comprehensions)
|
|
* have separate CFGs and are excluded from this check.
|
|
*/
|
|
|
|
import OldCfgImpl
|
|
|
|
private module Utils = EvalOrderCfgUtils<OldCfg>;
|
|
|
|
private import Utils
|
|
private import Utils::CfgTests
|
|
|
|
from TimerCfgNode a, TestFunction f
|
|
where allLiveReachable(a, f)
|
|
select a, "Unreachable live annotation; entry of $@ does not reach this node", f, f.getName()
|