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.
1 parent fb50ba4 commit 5dcc161Copy full SHA for 5dcc161
1 file changed
ql/src/codeql_ql/ast/Ast.qll
@@ -56,6 +56,15 @@ class AstNode extends TAstNode {
56
* Gets the primary QL class for the ast node.
57
*/
58
string getAPrimaryQlClass() { result = "???" }
59
+
60
+ /**
61
+ * Gets the predicate that contains this AST node.
62
+ */
63
+ pragma[noinline]
64
+ Predicate getEnclosingPredicate() {
65
+ not this instanceof Predicate and
66
+ toGenerated(result) = toGenerated(this).getParent+()
67
+ }
68
}
69
70
/** A toplevel QL program, i.e. a file. */
0 commit comments