Skip to content

Commit 476cc1d

Browse files
committed
wip
1 parent f8a076e commit 476cc1d

File tree

5 files changed

+527
-6
lines changed

5 files changed

+527
-6
lines changed

csharp/ql/lib/printCfg.ql

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
private import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl
11+
private import semmle.code.csharp.controlflow.ControlFlowGraph2 as C2
1112

1213
external string selectedSourceFile();
1314

@@ -22,6 +23,7 @@ external int selectedSourceColumn();
2223
private predicate selectedSourceColumnAlias = selectedSourceColumn/0;
2324

2425
module ViewCfgQueryInput implements ViewCfgQueryInputSig<File> {
26+
// module ViewCfgQueryInput implements C2::ControlFlow::ViewCfgQueryInputSig<File> {
2527
predicate selectedSourceFile = selectedSourceFileAlias/0;
2628

2729
predicate selectedSourceLine = selectedSourceLineAlias/0;
@@ -30,6 +32,7 @@ module ViewCfgQueryInput implements ViewCfgQueryInputSig<File> {
3032

3133
predicate cfgScopeSpan(
3234
CfgScope scope, File file, int startLine, int startColumn, int endLine, int endColumn
35+
// Callable scope, File file, int startLine, int startColumn, int endLine, int endColumn
3336
) {
3437
file = scope.getFile() and
3538
scope.getLocation().getStartLine() = startLine and
@@ -39,12 +42,13 @@ module ViewCfgQueryInput implements ViewCfgQueryInputSig<File> {
3942
loc.getEndColumn() = endColumn
4043
|
4144
loc = scope.(Callable).getBody().getLocation()
42-
or
43-
loc = scope.(Field).getInitializer().getLocation()
44-
or
45-
loc = scope.(Property).getInitializer().getLocation()
45+
// or
46+
// loc = scope.(Field).getInitializer().getLocation()
47+
// or
48+
// loc = scope.(Property).getInitializer().getLocation()
4649
)
4750
}
4851
}
4952

5053
import ViewCfgQuery<File, ViewCfgQueryInput>
54+
// import C2::ControlFlow::ViewCfgQuery<File, ViewCfgQueryInput>

0 commit comments

Comments
 (0)