Skip to content

Commit 12faa37

Browse files
committed
C++: Update ssa_escape.ql test now we don't have aliased SSA
1 parent ea2d3fc commit 12faa37

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
| escape.cpp:154:9:154:21 | no_ssa_addrOf |
2+
| escape.cpp:157:9:157:20 | no_ssa_refTo |
3+
| escape.cpp:160:9:160:32 | no_ssa_refToArrayElement |
4+
| escape.cpp:163:9:163:25 | no_ssa_refToArray |
5+
| escape.cpp:172:9:172:24 | no_ssa_passByPtr |
6+
| escape.cpp:175:9:175:24 | no_ssa_passByRef |
7+
| escape.cpp:178:9:178:28 | no_ssa_passByPtr_ret |
8+
| escape.cpp:181:9:181:28 | no_ssa_passByRef_ret |
9+
| escape.cpp:196:9:196:25 | no_ssa_passByPtr4 |
10+
| escape.cpp:197:9:197:25 | no_ssa_passByPtr5 |
11+
| escape.cpp:204:9:204:25 | no_ssa_passByRef7 |
12+
| escape.cpp:207:7:207:14 | no_ssa_c |

cpp/ql/test/library-tests/ir/escape/ssa_escape.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import cpp
2-
import semmle.code.cpp.ir.implementation.aliased_ssa.internal.AliasAnalysis
3-
import semmle.code.cpp.ir.implementation.aliased_ssa.internal.AliasConfiguration
2+
import semmle.code.cpp.ir.implementation.unaliased_ssa.internal.AliasAnalysis
3+
import semmle.code.cpp.ir.implementation.unaliased_ssa.internal.AliasConfiguration
44
import semmle.code.cpp.ir.implementation.unaliased_ssa.IR
55
import semmle.code.cpp.ir.implementation.UseSoundEscapeAnalysis
66

7-
class InterestingAllocation extends VariableAllocation {
7+
class InterestingAllocation extends Allocation {
88
IRUserVariable userVar;
99

10-
InterestingAllocation() { userVar = this.getIRVariable() }
10+
InterestingAllocation() { userVar = this }
1111

1212
final predicate shouldEscape() { userVar.getVariable().getName().matches("no_%") }
1313
}

0 commit comments

Comments
 (0)