File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
java/ql/lib/semmle/code/java/dataflow/internal Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -127,8 +127,6 @@ module Public {
127
127
or
128
128
result = this .( ImplicitPostUpdateNode ) .getPreUpdateNode ( ) .getType ( )
129
129
or
130
- result = this .( SummaryParameterNode ) .getTypeImpl ( )
131
- or
132
130
result = this .( FieldValueNode ) .getField ( ) .getType ( )
133
131
}
134
132
@@ -492,10 +490,6 @@ module Private {
492
490
override predicate isParameterOf ( DataFlowCallable c , int pos ) {
493
491
c .asSummarizedCallable ( ) = this .getSummarizedCallable ( ) and pos = this .getPosition ( )
494
492
}
495
-
496
- Type getTypeImpl ( ) {
497
- result = this .getSummarizedCallable ( ) .getParameterType ( this .getPosition ( ) )
498
- }
499
493
}
500
494
}
501
495
Original file line number Diff line number Diff line change @@ -505,6 +505,9 @@ module Private {
505
505
or
506
506
// Add the post-update node corresponding to the requested argument node
507
507
outputState ( c , s ) and isCallbackParameter ( s )
508
+ or
509
+ // Add the parameter node for parameter side-effects
510
+ outputState ( c , s ) and s = SummaryComponentStack:: argument ( _)
508
511
}
509
512
510
513
private newtype TSummaryNodeState =
@@ -713,6 +716,11 @@ module Private {
713
716
head = TSyntheticGlobalSummaryComponent ( sg ) and
714
717
result = getSyntheticGlobalType ( sg )
715
718
)
719
+ or
720
+ exists ( ParameterPosition pos |
721
+ head = TArgumentSummaryComponent ( pos ) and
722
+ result = getParameterType ( c , pos )
723
+ )
716
724
)
717
725
or
718
726
n = summaryNodeOutputState ( c , s ) and
Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ SummaryCall summaryDataFlowCall(SummaryNode receiver) { result.getReceiver() = r
32
32
/** Gets the type of content `c`. */
33
33
DataFlowType getContentType ( Content c ) { result = c .getType ( ) }
34
34
35
+ /** Gets the type of the parameter at the given position. */
36
+ DataFlowType getParameterType ( SummarizedCallable c , ParameterPosition pos ) {
37
+ result = getErasedRepr ( c .getParameterType ( pos ) )
38
+ }
39
+
35
40
/** Gets the return type of kind `rk` for callable `c`. */
36
41
DataFlowType getReturnType ( SummarizedCallable c , ReturnKind rk ) {
37
42
result = getErasedRepr ( c .getReturnType ( ) ) and
You can’t perform that action at this time.
0 commit comments