@@ -31,7 +31,7 @@ module Consistency {
31
31
query predicate uniqueEnclosingCallable ( Node n , string msg ) {
32
32
exists ( int c |
33
33
n instanceof RelevantNode and
34
- c = count ( n . getEnclosingCallable ( ) ) and
34
+ c = count ( nodeGetEnclosingCallable ( n ) ) and
35
35
c != 1 and
36
36
msg = "Node should have one enclosing callable but has " + c + "."
37
37
)
@@ -85,13 +85,13 @@ module Consistency {
85
85
}
86
86
87
87
query predicate parameterCallable ( ParameterNode p , string msg ) {
88
- exists ( DataFlowCallable c | p . isParameterOf ( c , _) and c != p . getEnclosingCallable ( ) ) and
88
+ exists ( DataFlowCallable c | isParameterNode ( p , c , _) and c != nodeGetEnclosingCallable ( p ) ) and
89
89
msg = "Callable mismatch for parameter."
90
90
}
91
91
92
92
query predicate localFlowIsLocal ( Node n1 , Node n2 , string msg ) {
93
93
simpleLocalFlowStep ( n1 , n2 ) and
94
- n1 . getEnclosingCallable ( ) != n2 . getEnclosingCallable ( ) and
94
+ nodeGetEnclosingCallable ( n1 ) != nodeGetEnclosingCallable ( n2 ) and
95
95
msg = "Local flow step does not preserve enclosing callable."
96
96
}
97
97
@@ -106,7 +106,7 @@ module Consistency {
106
106
query predicate unreachableNodeCCtx ( Node n , DataFlowCall call , string msg ) {
107
107
isUnreachableInCall ( n , call ) and
108
108
exists ( DataFlowCallable c |
109
- c = n . getEnclosingCallable ( ) and
109
+ c = nodeGetEnclosingCallable ( n ) and
110
110
not viableCallable ( call ) = c
111
111
) and
112
112
msg = "Call context for isUnreachableInCall is inconsistent with call graph."
@@ -120,7 +120,7 @@ module Consistency {
120
120
n .( ArgumentNode ) .argumentOf ( call , _) and
121
121
msg = "ArgumentNode and call does not share enclosing callable."
122
122
) and
123
- n . getEnclosingCallable ( ) != call .getEnclosingCallable ( )
123
+ nodeGetEnclosingCallable ( n ) != call .getEnclosingCallable ( )
124
124
}
125
125
126
126
// This predicate helps the compiler forget that in some languages
@@ -151,7 +151,7 @@ module Consistency {
151
151
}
152
152
153
153
query predicate postIsInSameCallable ( PostUpdateNode n , string msg ) {
154
- n . getEnclosingCallable ( ) != n .getPreUpdateNode ( ) . getEnclosingCallable ( ) and
154
+ nodeGetEnclosingCallable ( n ) != nodeGetEnclosingCallable ( n .getPreUpdateNode ( ) ) and
155
155
msg = "PostUpdateNode does not share callable with its pre-update node."
156
156
}
157
157
0 commit comments