Skip to content

Commit f35ab7c

Browse files
committed
Swift: Accept test changes to the cfg. These happen due to the fixes in 9e0cf62.
1 parent 8b7535a commit f35ab7c

File tree

1 file changed

+71
-63
lines changed

1 file changed

+71
-63
lines changed

swift/ql/test/library-tests/controlflow/graph/Cfg.expected

Lines changed: 71 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,19 +1670,29 @@ cfg.swift:
16701670
#-----| -> 2
16711671

16721672
# 185| ... call to <=(_:_:) ...
1673-
#-----| -> { ... }
1673+
#-----| false -> [false] ... call to &&(_:_:) ...
1674+
#-----| true -> { ... }
16741675

16751676
# 185| ... call to &&(_:_:) ...
16761677
#-----| exception -> exit m1(x:) (normal)
1677-
#-----| -> { ... }
1678+
#-----| false -> [false] ... call to &&(_:_:) ...
1679+
#-----| true -> { ... }
1680+
1681+
# 185| [false] ... call to &&(_:_:) ...
1682+
#-----| exception -> exit m1(x:) (normal)
1683+
#-----| false -> [false] ... call to &&(_:_:) ...
16781684

16791685
# 185| ... call to &&(_:_:) ...
16801686
#-----| exception -> exit m1(x:) (normal)
16811687
#-----| true -> print(_:separator:terminator:)
16821688
#-----| false -> print(_:separator:terminator:)
16831689

16841690
# 185| StmtCondition
1685-
#-----| -> &&(_:_:)
1691+
#-----| -> <=(_:_:)
1692+
1693+
# 185| [false] ... call to &&(_:_:) ...
1694+
#-----| exception -> exit m1(x:) (normal)
1695+
#-----| false -> print(_:separator:terminator:)
16861696

16871697
# 185| <=(_:_:)
16881698
#-----| -> Int.Type
@@ -1696,30 +1706,60 @@ cfg.swift:
16961706
# 185| 2
16971707
#-----| -> ... call to <=(_:_:) ...
16981708

1699-
# 185| &&(_:_:)
1700-
#-----| -> Bool.Type
1709+
# 185| x
1710+
#-----| -> 0
17011711

1702-
# 185| Bool.Type
1703-
#-----| -> call to &&(_:_:)
1712+
# 185| ... call to >(_:_:) ...
1713+
#-----| -> return ...
17041714

1705-
# 185| call to &&(_:_:)
1706-
#-----| -> <=(_:_:)
1715+
# 185| return ...
1716+
#-----| -> ... call to &&(_:_:) ...
17071717

17081718
# 185| { ... }
1709-
#-----| -> ... call to &&(_:_:) ...
1719+
#-----| -> >(_:_:)
17101720

1711-
# 185| &&(_:_:)
1712-
#-----| -> Bool.Type
1721+
# 185| >(_:_:)
1722+
#-----| -> Int.Type
17131723

1714-
# 185| Bool.Type
1715-
#-----| -> call to &&(_:_:)
1724+
# 185| Int.Type
1725+
#-----| -> call to >(_:_:)
17161726

1717-
# 185| call to &&(_:_:)
1718-
#-----| -> &&(_:_:)
1727+
# 185| call to >(_:_:)
1728+
#-----| -> x
17191729

1720-
# 185| { ... }
1730+
# 185| 0
1731+
#-----| -> ... call to >(_:_:) ...
1732+
1733+
# 185| call to ...
1734+
#-----| -> return ...
1735+
1736+
# 185| return ...
17211737
#-----| -> ... call to &&(_:_:) ...
17221738

1739+
# 185| { ... }
1740+
#-----| -> ==(_:_:)
1741+
1742+
# 185| (...)
1743+
#-----| -> call to ...
1744+
1745+
# 185| x
1746+
#-----| -> 5
1747+
1748+
# 185| ... call to ==(_:_:) ...
1749+
#-----| -> (...)
1750+
1751+
# 185| ==(_:_:)
1752+
#-----| -> Int.Type
1753+
1754+
# 185| Int.Type
1755+
#-----| -> call to ==(_:_:)
1756+
1757+
# 185| call to ==(_:_:)
1758+
#-----| -> x
1759+
1760+
# 185| 5
1761+
#-----| -> ... call to ==(_:_:) ...
1762+
17231763
# 186| print(_:separator:terminator:)
17241764
#-----| -> x is 1
17251765

@@ -2058,48 +2098,14 @@ cfg.swift:
20582098
# 224| if ... then { ... }
20592099
#-----| -> StmtCondition
20602100

2061-
# 224| !(_:)
2062-
#-----| -> Bool.Type
2063-
2064-
# 224| Bool.Type
2065-
#-----| -> call to !(_:)
2066-
2067-
# 224| call to !(_:)
2068-
#-----| -> true
2069-
20702101
# 224| StmtCondition
2071-
#-----| -> !(_:)
2102+
#-----| -> true
20722103

2073-
# 224| call to ...
2104+
# 224| [false] call to ...
20742105
#-----| false -> exit constant_condition() (normal)
2075-
#-----| true -> print(_:separator:terminator:)
20762106

20772107
# 224| true
2078-
#-----| -> call to ...
2079-
2080-
# 225| print(_:separator:terminator:)
2081-
#-----| -> Impossible
2082-
2083-
# 225| call to print(_:separator:terminator:)
2084-
#-----| -> exit constant_condition() (normal)
2085-
2086-
# 225| default separator
2087-
#-----| -> default terminator
2088-
2089-
# 225| default terminator
2090-
#-----| -> call to print(_:separator:terminator:)
2091-
2092-
# 225| (Any) ...
2093-
#-----| -> [...]
2094-
2095-
# 225| Impossible
2096-
#-----| -> (Any) ...
2097-
2098-
# 225| [...]
2099-
#-----| -> default separator
2100-
2101-
# 225| [...]
2102-
#-----| -> [...]
2108+
#-----| true -> [false] call to ...
21032109

21042110
# 229| empty_else(b:)
21052111
#-----| -> b
@@ -2197,7 +2203,7 @@ cfg.swift:
21972203
#-----| -> StmtCondition
21982204

21992205
# 238| StmtCondition
2200-
#-----| -> ||(_:_:)
2206+
#-----| -> b1
22012207

22022208
# 238| [false] (...)
22032209
#-----| false -> exit disjunct(b1:b2:) (normal)
@@ -2206,24 +2212,26 @@ cfg.swift:
22062212
#-----| true -> print(_:separator:terminator:)
22072213

22082214
# 238| b1
2209-
#-----| -> { ... }
2215+
#-----| true -> [true] ... call to ||(_:_:) ...
2216+
#-----| false -> { ... }
22102217

22112218
# 238| ... call to ||(_:_:) ...
22122219
#-----| exception -> exit disjunct(b1:b2:) (normal)
22132220
#-----| false -> [false] (...)
22142221
#-----| true -> [true] (...)
22152222

2216-
# 238| Bool.Type
2217-
#-----| -> call to ||(_:_:)
2223+
# 238| [true] ... call to ||(_:_:) ...
2224+
#-----| exception -> exit disjunct(b1:b2:) (normal)
2225+
#-----| true -> [true] (...)
22182226

2219-
# 238| call to ||(_:_:)
2220-
#-----| -> b1
2227+
# 238| b2
2228+
#-----| -> return ...
22212229

2222-
# 238| ||(_:_:)
2223-
#-----| -> Bool.Type
2230+
# 238| return ...
2231+
#-----| -> ... call to ||(_:_:) ...
22242232

22252233
# 238| { ... }
2226-
#-----| -> ... call to ||(_:_:) ...
2234+
#-----| -> b2
22272235

22282236
# 239| print(_:separator:terminator:)
22292237
#-----| -> b1 or b2

0 commit comments

Comments
 (0)