mirror of
https://github.com/github/codeql.git
synced 2026-05-05 21:55:19 +02:00
C#: Fix control flow graph for using declaration statements.
This commit is contained in:
10
csharp/ql/test/library-tests/csharp8/UsingControlFlow.ql
Normal file
10
csharp/ql/test/library-tests/csharp8/UsingControlFlow.ql
Normal 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")
|
||||
}
|
||||
Reference in New Issue
Block a user