cache AstNode::getParent

This commit is contained in:
Erik Krogh Kristensen
2021-02-22 17:19:47 +01:00
parent b4e6f92505
commit 06091e5312

View File

@@ -118,6 +118,7 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
int getNumChildStmt() { result = count(getAChildStmt()) }
/** Gets the parent node of this node, if any. */
cached
ASTNode getParent() { this = result.getAChild() }
/** Gets the first control flow node belonging to this syntactic entity. */