mirror of
https://github.com/github/codeql.git
synced 2026-05-30 19:11:23 +02:00
19 lines
506 B
Plaintext
19 lines
506 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 TimerAnnotation ann
|
|
where neverReachable(ann)
|
|
select ann, "Node annotated with t.never is reachable in $@", ann.getTestFunction(),
|
|
ann.getTestFunction().getName()
|