mirror of
https://github.com/github/codeql.git
synced 2026-06-02 04:10:17 +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>
19 lines
511 B
Plaintext
19 lines
511 B
Plaintext
/**
|
|
* Checks that expressions annotated with `t.never` either have no CFG
|
|
* node, or if they do, that the node is not reachable from its scope's
|
|
* entry (including within the same basic block).
|
|
*/
|
|
|
|
import python
|
|
import TimerUtils
|
|
import OldCfgImpl
|
|
|
|
private module Utils = EvalOrderCfgUtils<OldCfg>;
|
|
|
|
private import Utils::CfgTests
|
|
|
|
from NeverTimerAnnotation ann
|
|
where neverReachable(ann)
|
|
select ann, "Node annotated with t.never is reachable in $@", ann.getTestFunction(),
|
|
ann.getTestFunction().getName()
|