@@ -31,7 +31,7 @@ module Consistency {
3131 query predicate uniqueEnclosingCallable ( Node n , string msg ) {
3232 exists ( int c |
3333 n instanceof RelevantNode and
34- c = count ( n . getEnclosingCallable ( ) ) and
34+ c = count ( nodeGetEnclosingCallable ( n ) ) and
3535 c != 1 and
3636 msg = "Node should have one enclosing callable but has " + c + "."
3737 )
@@ -85,13 +85,13 @@ module Consistency {
8585 }
8686
8787 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
8989 msg = "Callable mismatch for parameter."
9090 }
9191
9292 query predicate localFlowIsLocal ( Node n1 , Node n2 , string msg ) {
9393 simpleLocalFlowStep ( n1 , n2 ) and
94- n1 . getEnclosingCallable ( ) != n2 . getEnclosingCallable ( ) and
94+ nodeGetEnclosingCallable ( n1 ) != nodeGetEnclosingCallable ( n2 ) and
9595 msg = "Local flow step does not preserve enclosing callable."
9696 }
9797
@@ -106,7 +106,7 @@ module Consistency {
106106 query predicate unreachableNodeCCtx ( Node n , DataFlowCall call , string msg ) {
107107 isUnreachableInCall ( n , call ) and
108108 exists ( DataFlowCallable c |
109- c = n . getEnclosingCallable ( ) and
109+ c = nodeGetEnclosingCallable ( n ) and
110110 not viableCallable ( call ) = c
111111 ) and
112112 msg = "Call context for isUnreachableInCall is inconsistent with call graph."
@@ -120,7 +120,7 @@ module Consistency {
120120 n .( ArgumentNode ) .argumentOf ( call , _) and
121121 msg = "ArgumentNode and call does not share enclosing callable."
122122 ) and
123- n . getEnclosingCallable ( ) != call .getEnclosingCallable ( )
123+ nodeGetEnclosingCallable ( n ) != call .getEnclosingCallable ( )
124124 }
125125
126126 // This predicate helps the compiler forget that in some languages
@@ -151,7 +151,7 @@ module Consistency {
151151 }
152152
153153 query predicate postIsInSameCallable ( PostUpdateNode n , string msg ) {
154- n . getEnclosingCallable ( ) != n .getPreUpdateNode ( ) . getEnclosingCallable ( ) and
154+ nodeGetEnclosingCallable ( n ) != nodeGetEnclosingCallable ( n .getPreUpdateNode ( ) ) and
155155 msg = "PostUpdateNode does not share callable with its pre-update node."
156156 }
157157
0 commit comments