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 {
11361136 override predicate isParameterOf ( DataFlowCallable c , ParameterPosition pos ) {
11371137 this .getSummarizedCallable ( ) = c .asSummarizedCallable ( ) and pos = this .getPosition ( )
11381138 }
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- }
11491139 }
11501140}
11511141
Original file line number Diff line number Diff line change @@ -41,6 +41,19 @@ DataFlowType getContentType(Content c) {
4141 )
4242}
4343
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+
4457private DataFlowType getReturnTypeBase ( DotNet:: Callable c , ReturnKind rk ) {
4558 exists ( Type t | result = Gvn:: getGlobalValueNumber ( t ) |
4659 rk instanceof NormalReturnKind and
You can’t perform that action at this time.
0 commit comments