mirror of
https://github.com/github/codeql.git
synced 2026-07-29 23:00:09 +02:00
20 lines
529 B
Plaintext
20 lines
529 B
Plaintext
/**
|
|
* New-CFG version of NeverReachable.
|
|
*
|
|
* 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 NewCfgImpl
|
|
|
|
private module Utils = EvalOrderCfgUtils<NewCfg>;
|
|
|
|
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()
|