mirror of
https://github.com/github/codeql.git
synced 2026-02-20 08:53:49 +01:00
Add unique wrapper to AstNode::getParent()
This commit is contained in:
@@ -11,7 +11,9 @@ class AstNode extends @ast_node {
|
||||
|
||||
Location getLocation() { none() }
|
||||
|
||||
AstNode getParent() { this = result.getAFieldOrChild() }
|
||||
AstNode getParent() {
|
||||
result = unique(AstNode parent | this = parent.getAFieldOrChild() | parent)
|
||||
}
|
||||
|
||||
AstNode getAFieldOrChild() { none() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user