mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
30 lines
896 B
Plaintext
30 lines
896 B
Plaintext
import csharp
|
|
import semmle.code.csharp.dataflow.internal.DataFlowDispatch
|
|
import semmle.code.csharp.dataflow.internal.DataFlowPrivate
|
|
|
|
private class DataFlowCallAdjusted extends TDataFlowCall {
|
|
string toString() { result = this.(DataFlowCall).toString() }
|
|
|
|
Location getLocation() {
|
|
exists(Location l |
|
|
l = this.(DataFlowCall).getLocation() and
|
|
if l instanceof SourceLocation then result = l else result instanceof EmptyLocation
|
|
)
|
|
}
|
|
}
|
|
|
|
private class NodeAdjusted extends TNode {
|
|
string toString() { result = this.(DataFlow::Node).toString() }
|
|
|
|
Location getLocation() {
|
|
exists(Location l |
|
|
l = this.(DataFlow::Node).getLocation() and
|
|
if l instanceof SourceLocation then result = l else result instanceof EmptyLocation
|
|
)
|
|
}
|
|
}
|
|
|
|
from DataFlowCallAdjusted call, NodeAdjusted n, ReturnKind kind
|
|
where n = getAnOutNode(call, kind)
|
|
select call, kind, n
|