File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
ruby/ql/consistency-queries Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1
1
import codeql.ruby.controlflow.internal.ControlFlowGraphImplShared:: Consistency
2
+ import codeql.ruby.AST
3
+ import codeql.ruby.controlflow.internal.ControlFlowGraphImpl
4
+
5
+ /**
6
+ * All `Expr` nodes are `PostOrderTree`s
7
+ */
8
+ query predicate nonPostOrderExprTypes ( string cls ) {
9
+ exists ( Expr e |
10
+ e instanceof ControlFlowTree and
11
+ not exists ( e .getDesugared ( ) ) and
12
+ cls = e .getAPrimaryQlClass ( ) and
13
+ not e instanceof PostOrderTree and
14
+ not e instanceof LeafTree
15
+ )
16
+ or
17
+ exists ( Expr e |
18
+ e instanceof ControlFlowTree and
19
+ e = any ( AstNode x ) .getDesugared ( ) and
20
+ cls = e .getAPrimaryQlClass ( ) and
21
+ not e instanceof PostOrderTree and
22
+ not e instanceof LeafTree
23
+ )
24
+ }
You can’t perform that action at this time.
0 commit comments