File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
csharp/ql/lib/semmle/code/csharp/dataflow/internal Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -744,6 +744,9 @@ private module Cached {
744744 ) {
745745 FlowSummaryImpl:: Private:: summaryNodeRange ( c , state )
746746 } or
747+ TSummaryParameterNode ( FlowSummaryImpl:: Public:: SummarizedCallable c , ParameterPosition pos ) {
748+ FlowSummaryImpl:: Private:: summaryParameterNodeRange ( c , pos )
749+ } or
747750 TParamsArgumentNode ( ControlFlow:: Node callCfn ) {
748751 callCfn = any ( Call c | isParamsArg ( c , _, _) ) .getAControlFlowNode ( )
749752 }
@@ -963,6 +966,28 @@ private module ParameterNodes {
963966 c .asCallable ( ) = this .getEnclosingCallable ( )
964967 }
965968 }
969+
970+ /** A parameter for a library callable with a flow summary. */
971+ class SummaryParameterNode extends ParameterNodeImpl , TSummaryParameterNode {
972+ private FlowSummaryImpl:: Public:: SummarizedCallable sc ;
973+ private ParameterPosition pos_ ;
974+
975+ SummaryParameterNode ( ) { this = TSummaryParameterNode ( sc , pos_ ) }
976+
977+ override predicate isParameterOf ( DataFlowCallable c , ParameterPosition pos ) {
978+ sc = c and pos = pos_
979+ }
980+
981+ override DataFlowCallable getEnclosingCallableImpl ( ) { result = sc }
982+
983+ override Type getTypeImpl ( ) { result instanceof ObjectType }
984+
985+ override ControlFlow:: Node getControlFlowNodeImpl ( ) { none ( ) }
986+
987+ override EmptyLocation getLocationImpl ( ) { any ( ) }
988+
989+ override string toStringImpl ( ) { result = "parameter " + pos_ + " of " + sc }
990+ }
966991}
967992
968993import ParameterNodes
You can’t perform that action at this time.
0 commit comments