File tree Expand file tree Collapse file tree
csharp/ql/lib/semmle/code/csharp/dataflow/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,15 @@ module BaseSsa {
77 private import AssignableDefinitions
88 private import codeql.ssa.Ssa as SsaImplCommon
99
10+ cached
11+ private module BaseSsaStage {
12+ cached
13+ predicate ref ( ) { any ( ) }
14+
15+ cached
16+ predicate backref ( ) { ( exists ( any ( SsaDefinition def ) .getARead ( ) ) implies any ( ) ) }
17+ }
18+
1019 /**
1120 * Holds if the `i`th node of basic block `bb` is assignable definition `def`,
1221 * targeting local scope variable `v`.
@@ -83,6 +92,7 @@ module BaseSsa {
8392 class SourceVariable = SimpleLocalScopeVariable ;
8493
8594 predicate variableWrite ( BasicBlock bb , int i , SourceVariable v , boolean certain ) {
95+ BaseSsaStage:: ref ( ) and
8696 exists ( AssignableDefinition def |
8797 definitionAt ( def , bb , i , v ) and
8898 if def .isCertain ( ) then certain = true else certain = false
You can’t perform that action at this time.
0 commit comments