C#: Fix control flow graph for using declaration statements.

This commit is contained in:
Calum Grant
2019-06-04 18:06:42 +01:00
parent 20752c80c9
commit 9678f8eaba
3 changed files with 37 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
import csharp
import semmle.code.csharp.controlflow.ControlFlowGraph
query predicate edges(ControlFlow::Node node1, ControlFlow::Node node2, string label, string value) {
label = "semmle.label" and
exists(ControlFlow::SuccessorType t |
node2 = node1.getASuccessorByType(t) and value = t.toString()
)
and node1.getEnclosingCallable().hasName("TestUsingDeclarations")
}