Skip to content

Commit 883aa89

Browse files
committed
Rust: fix CFG for MacroPat
1 parent 943dd8e commit 883aa89

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ class LetStmtTree extends PreOrderTree, LetStmt {
143143
}
144144

145145
class MacroCallTree extends StandardPostOrderTree, MacroCall {
146+
MacroCallTree() { not this.getParentNode() instanceof MacroPat }
147+
146148
override AstNode getChildNode(int i) { i = 0 and result = this.getMacroCallExpansion() }
147149
}
148150

0 commit comments

Comments
 (0)