Skip to content

Commit 859b305

Browse files
committed
Swift: Add consistency queries to CFG tests.
1 parent 184cb74 commit 859b305

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

swift/ql/lib/codeql/swift/dataflow/Ssa.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ module Ssa {
124124
}
125125
}
126126

127-
private module SsaImpl = SsaImplCommon::Make<SsaInput>;
127+
/**
128+
* INTERNAL: Do not use.
129+
*/
130+
module SsaImpl = SsaImplCommon::Make<SsaInput>;
128131

129132
cached
130133
class Definition extends SsaImpl::Definition {
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
nonUniqueSetRepresentation
2+
breakInvariant2
3+
breakInvariant3
4+
breakInvariant4
5+
breakInvariant5
6+
multipleSuccessors
7+
| cfg.swift:33:28:33:28 | ... is ... | no-match | cfg.swift:33:49:33:60 | call to isZero(x:) |
8+
| cfg.swift:33:28:33:28 | ... is ... | no-match | cfg.swift:35:5:37:3 | case ... |
9+
| cfg.swift:144:10:144:10 | =~ ... | no-match | cfg.swift:144:18:144:34 | ... .&&(_:_:) ... |
10+
| cfg.swift:144:10:144:10 | =~ ... | no-match | cfg.swift:146:5:147:14 | case ... |
11+
| cfg.swift:456:19:456:24 | #keyPath(...) | successor | cfg.swift:456:3:456:24 | var ... = ... |
12+
| cfg.swift:456:19:456:24 | #keyPath(...) | successor | cfg.swift:456:19:456:24 | exit #keyPath(...) (normal) |
13+
| cfg.swift:457:22:457:31 | #keyPath(...) | successor | cfg.swift:457:3:457:31 | var ... = ... |
14+
| cfg.swift:457:22:457:31 | #keyPath(...) | successor | cfg.swift:457:22:457:31 | exit #keyPath(...) (normal) |
15+
| cfg.swift:458:28:458:37 | #keyPath(...) | successor | cfg.swift:458:3:458:37 | var ... = ... |
16+
| cfg.swift:458:28:458:37 | #keyPath(...) | successor | cfg.swift:458:28:458:37 | exit #keyPath(...) (normal) |
17+
| cfg.swift:459:22:459:31 | #keyPath(...) | successor | cfg.swift:459:3:459:31 | var ... = ... |
18+
| cfg.swift:459:22:459:31 | #keyPath(...) | successor | cfg.swift:459:22:459:31 | exit #keyPath(...) (normal) |
19+
| cfg.swift:515:6:515:28 | #available | false | cfg.swift:515:42:515:46 | iOS 12 |
20+
| cfg.swift:515:6:515:28 | #available | false | cfg.swift:519:10:519:10 | x |
21+
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:40:11:40:11 | OpaqueValueExpr |
22+
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:40:12:40:12 | .appendLiteral(_:) |
23+
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:263:10:263:10 | OpaqueValueExpr |
24+
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:263:11:263:11 | .appendLiteral(_:) |
25+
simpleAndNormalSuccessors
26+
deadEnd
27+
| cfg.swift:33:49:33:60 | call to isZero(x:) |
28+
| cfg.swift:144:18:144:34 | ... .&&(_:_:) ... |
29+
| cfg.swift:464:7:464:7 | apply_kpGet_mayB_x |
30+
| cfg.swift:464:7:464:7 | apply_kpGet_mayB_x |
31+
| cfg.swift:464:7:464:7 | apply_kpGet_mayB_x |
32+
| cfg.swift:464:7:464:7 | apply_kpGet_mayB_x |
33+
| file://:0:0:0:0 | ... = ... |
34+
| file://:0:0:0:0 | ... = ... |
35+
nonUniqueSplitKind
36+
nonUniqueListOrder
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import codeql.swift.controlflow.internal.ControlFlowGraphImplShared::Consistency

0 commit comments

Comments
 (0)