@@ -221,16 +221,17 @@ module DataFlowPrivateCached {
221221 )
222222 }
223223
224- private DotNet:: Type getDotNetType ( Node node ) {
224+ cached
225+ DotNet:: Type getType ( Node node ) {
225226 result = node .( ExprNode ) .getExpr ( ) .getType ( )
226227 or
227228 result = node .( SsaDefinitionNode ) .getDefinition ( ) .getSourceVariable ( ) .getType ( )
228229 or
229230 exists ( CIL:: Parameter p | node = TCilParameterNode ( p ) | result = p .getType ( ) )
230231 or
231- result = getDotNetType ( node .( TaintedParameterNode ) .getUnderlyingNode ( ) )
232+ result = getType ( node .( TaintedParameterNode ) .getUnderlyingNode ( ) )
232233 or
233- result = getDotNetType ( node .( TaintedReturnNode ) .getUnderlyingNode ( ) )
234+ result = getType ( node .( TaintedReturnNode ) .getUnderlyingNode ( ) )
234235 or
235236 exists ( LocalScopeVariable v | node = TImplicitCapturedArgumentNode ( _, v ) | result = v .getType ( ) )
236237 or
@@ -239,15 +240,6 @@ module DataFlowPrivateCached {
239240 )
240241 }
241242
242- cached
243- Type getType ( Node node ) {
244- exists ( DotNet:: Type t | t = getDotNetType ( node ) |
245- result = t
246- or
247- t .matchesHandle ( result )
248- )
249- }
250-
251243 cached
252244 Location getLocation ( Node node ) {
253245 result = node .( ExprNode ) .getExpr ( ) .getLocation ( )
@@ -1006,19 +998,19 @@ predicate readStep(Node node1, Content f, Node node2) {
1006998 none ( ) // stub implementation
1007999}
10081000
1009- private predicate suppressUnusedType ( Type t ) { any ( ) }
1001+ private predicate suppressUnusedType ( DotNet :: Type t ) { any ( ) }
10101002
10111003/**
10121004 * Gets a representative type for `t` for the purpose of pruning possible flow.
10131005 *
10141006 * Type-based pruning is disabled for now, so this is a stub implementation.
10151007 */
10161008bindingset [ t]
1017- Type getErasedRepr ( Type t ) { suppressUnusedType ( t ) and result instanceof ObjectType } // stub implementation
1009+ Type getErasedRepr ( DotNet :: Type t ) { suppressUnusedType ( t ) and result instanceof ObjectType } // stub implementation
10181010
10191011/** Gets a string representation of a type returned by `getErasedRepr`. */
10201012bindingset [ t]
1021- string ppReprType ( Type t ) { suppressUnusedType ( t ) and result = "" } // stub implementation
1013+ string ppReprType ( DotNet :: Type t ) { suppressUnusedType ( t ) and result = "" } // stub implementation
10221014
10231015/**
10241016 * Holds if `t1` and `t2` are compatible, that is, whether data can flow from
@@ -1027,7 +1019,7 @@ string ppReprType(Type t) { suppressUnusedType(t) and result = "" } // stub impl
10271019 * Type-based pruning is disabled for now, so this is a stub implementation.
10281020 */
10291021bindingset [ t1, t2]
1030- predicate compatibleTypes ( Type t1 , Type t2 ) {
1022+ predicate compatibleTypes ( DotNet :: Type t1 , DotNet :: Type t2 ) {
10311023 any ( ) // stub implementation
10321024}
10331025
@@ -1055,6 +1047,6 @@ class DataFlowCallable = DotNet::Callable;
10551047
10561048class DataFlowExpr = DotNet:: Expr ;
10571049
1058- class DataFlowType = Type ;
1050+ class DataFlowType = DotNet :: Type ;
10591051
10601052class DataFlowLocation = Location ;
0 commit comments