@@ -5,7 +5,6 @@ private import dotnet
5
5
private import semmle.code.csharp.dispatch.Dispatch
6
6
private import semmle.code.csharp.dataflow.ExternalFlow
7
7
private import semmle.code.csharp.dataflow.FlowSummary
8
- private import semmle.code.csharp.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon
9
8
private import semmle.code.csharp.dataflow.internal.DataFlowPrivate
10
9
private import semmle.code.csharp.dataflow.internal.DataFlowDispatch as DataFlowDispatch
11
10
private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
@@ -77,13 +76,11 @@ class ExternalApi extends DotNet::Callable {
77
76
78
77
/** Gets a node that is an output from a call to this API. */
79
78
private DataFlow:: Node getAnOutput ( ) {
80
- exists (
81
- Call c , DataFlowDispatch:: NonDelegateDataFlowCall dc , DataFlowImplCommon:: ReturnKindExt ret
82
- |
79
+ exists ( Call c , DataFlowDispatch:: NonDelegateDataFlowCall dc |
83
80
dc .getDispatchCall ( ) .getCall ( ) = c and
84
81
c .getTarget ( ) .getUnboundDeclaration ( ) = this
85
82
|
86
- result = ret . getAnOutNode ( dc )
83
+ result = DataFlowDispatch :: getAnOutNode ( dc , _ )
87
84
)
88
85
}
89
86
@@ -119,18 +116,17 @@ class ExternalApi extends DotNet::Callable {
119
116
}
120
117
121
118
/**
122
- * Gets the nested name of the declaration .
119
+ * Gets the nested name of the type `t` .
123
120
*
124
- * If the declaration is not a nested type, the result is the same as \`getName()\`.
121
+ * If the type is not a nested type, the result is the same as \`getName()\`.
125
122
* Otherwise the name of the nested type is prefixed with a \`+\` and appended to
126
123
* the name of the enclosing type, which might be a nested type as well.
127
124
*/
128
- private string nestedName ( Declaration declaration ) {
129
- not exists ( declaration .getDeclaringType ( ) .getUnboundDeclaration ( ) ) and
130
- result = declaration .getName ( )
125
+ private string nestedName ( Type t ) {
126
+ not exists ( t .getDeclaringType ( ) .getUnboundDeclaration ( ) ) and
127
+ result = t .getName ( )
131
128
or
132
- nestedName ( declaration .getDeclaringType ( ) .getUnboundDeclaration ( ) ) + "+" + declaration .getName ( ) =
133
- result
129
+ nestedName ( t .getDeclaringType ( ) .getUnboundDeclaration ( ) ) + "+" + t .getName ( ) = result
134
130
}
135
131
136
132
/**
0 commit comments