File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
csharp/ql/lib/semmle/code/csharp/dataflow/internal Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -1136,16 +1136,6 @@ private module ParameterNodes {
1136
1136
override predicate isParameterOf ( DataFlowCallable c , ParameterPosition pos ) {
1137
1137
this .getSummarizedCallable ( ) = c .asSummarizedCallable ( ) and pos = this .getPosition ( )
1138
1138
}
1139
-
1140
- override Type getTypeImpl ( ) {
1141
- exists ( int i |
1142
- this .getPosition ( ) .getPosition ( ) = i and
1143
- result = this .getSummarizedCallable ( ) .getParameter ( i ) .getType ( )
1144
- )
1145
- or
1146
- this .getPosition ( ) .isThisParameter ( ) and
1147
- result = this .getSummarizedCallable ( ) .getDeclaringType ( )
1148
- }
1149
1139
}
1150
1140
}
1151
1141
Original file line number Diff line number Diff line change @@ -41,6 +41,19 @@ DataFlowType getContentType(Content c) {
41
41
)
42
42
}
43
43
44
+ /** Gets the type of the parameter at the given position. */
45
+ DataFlowType getParameterType ( SummarizedCallable c , ParameterPosition pos ) {
46
+ exists ( Type t | result = Gvn:: getGlobalValueNumber ( t ) |
47
+ exists ( int i |
48
+ pos .getPosition ( ) = i and
49
+ t = c .getParameter ( i ) .getType ( )
50
+ )
51
+ or
52
+ pos .isThisParameter ( ) and
53
+ t = c .getDeclaringType ( )
54
+ )
55
+ }
56
+
44
57
private DataFlowType getReturnTypeBase ( DotNet:: Callable c , ReturnKind rk ) {
45
58
exists ( Type t | result = Gvn:: getGlobalValueNumber ( t ) |
46
59
rk instanceof NormalReturnKind and
You can’t perform that action at this time.
0 commit comments