We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
AstCfgNode
1 parent 6b25bea commit 2818893Copy full SHA for 2818893
rust/ql/lib/codeql/rust/controlflow/CfgNodes.qll
@@ -8,13 +8,15 @@ private import ControlFlowGraph
8
9
/** A CFG node that corresponds to an element in the AST. */
10
class AstCfgNode extends CfgNode {
11
- AstCfgNode() { exists(this.getAstNode()) }
+ AstNode node;
12
+
13
+ AstCfgNode() { node = this.getAstNode() }
14
}
15
16
/** A CFG node that corresponds to an expression in the AST. */
17
class ExprCfgNode extends AstCfgNode {
- ExprCfgNode() { this.getAstNode() instanceof Expr }
18
+ override Expr node;
19
20
/** Gets the underlying expression. */
- Expr getExpr() { result = this.getAstNode() }
21
+ Expr getExpr() { result = node }
22
0 commit comments