Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
GetAnOutNode.ql
1 parent cbd21ed commit 069cf9dCopy full SHA for 069cf9d
1 file changed
csharp/ql/test/library-tests/dataflow/global/GetAnOutNode.ql
@@ -13,17 +13,10 @@ private class DataFlowCallAdjusted extends TDataFlowCall {
13
}
14
15
16
-private class NodeAdjusted extends TNode {
17
- string toString() { result = this.(DataFlow::Node).toString() }
18
-
19
- Location getLocation() {
20
- exists(Location l |
21
- l = this.(DataFlow::Node).getLocation() and
22
- if l instanceof SourceLocation then result = l else result instanceof EmptyLocation
23
- )
24
- }
+private class SourceNode extends DataFlow::Node {
+ SourceNode() { this.getLocation().getFile().fromSource() }
25
26
27
-from DataFlowCallAdjusted call, NodeAdjusted n, ReturnKind kind
+from DataFlowCallAdjusted call, SourceNode n, ReturnKind kind
28
where n = getAnOutNode(call, kind)
29
select call, kind, n
0 commit comments