mirror of
https://github.com/github/codeql.git
synced 2026-06-03 04:40:14 +02:00
Currently we only instantiate them with the old CFG library, but in the future we'll want to do this with the new library as well. Co-authored-by: yoff <yoff@github.com>
20 lines
589 B
Plaintext
20 lines
589 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 python
|
|
import TimerUtils
|
|
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()
|