mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Swift: update dataflow test for nil coalescing
This commit is contained in:
@@ -139,6 +139,8 @@ edges
|
||||
| test.swift:270:15:270:22 | call to source() | test.swift:270:15:270:31 | call to signum() |
|
||||
| test.swift:271:15:271:16 | ...? | test.swift:271:15:271:25 | call to signum() |
|
||||
| test.swift:271:15:271:25 | call to signum() | test.swift:271:15:271:25 | OptionalEvaluationExpr |
|
||||
| test.swift:275:20:275:27 | call to source() | test.swift:275:15:275:27 | ... ??(_:_:) ... |
|
||||
| test.swift:277:20:277:27 | call to source() | test.swift:277:15:277:27 | ... ??(_:_:) ... |
|
||||
| test.swift:279:26:279:26 | x [some:0] | test.swift:279:26:279:27 | ...! |
|
||||
| test.swift:279:26:279:27 | ...! | test.swift:279:15:279:31 | ... ? ... : ... |
|
||||
| test.swift:280:26:280:26 | x [some:0] | test.swift:280:26:280:27 | ...! |
|
||||
@@ -673,6 +675,9 @@ nodes
|
||||
| test.swift:271:15:271:25 | call to signum() | semmle.label | call to signum() |
|
||||
| test.swift:274:15:274:20 | ... ??(_:_:) ... | semmle.label | ... ??(_:_:) ... |
|
||||
| test.swift:275:15:275:27 | ... ??(_:_:) ... | semmle.label | ... ??(_:_:) ... |
|
||||
| test.swift:275:20:275:27 | call to source() | semmle.label | call to source() |
|
||||
| test.swift:277:15:277:27 | ... ??(_:_:) ... | semmle.label | ... ??(_:_:) ... |
|
||||
| test.swift:277:20:277:27 | call to source() | semmle.label | call to source() |
|
||||
| test.swift:279:15:279:31 | ... ? ... : ... | semmle.label | ... ? ... : ... |
|
||||
| test.swift:279:26:279:26 | x [some:0] | semmle.label | x [some:0] |
|
||||
| test.swift:279:26:279:27 | ...! | semmle.label | ...! |
|
||||
@@ -1187,6 +1192,8 @@ subpaths
|
||||
| test.swift:271:15:271:25 | OptionalEvaluationExpr | test.swift:259:12:259:19 | call to source() | test.swift:271:15:271:25 | OptionalEvaluationExpr | result |
|
||||
| test.swift:274:15:274:20 | ... ??(_:_:) ... | test.swift:259:12:259:19 | call to source() | test.swift:274:15:274:20 | ... ??(_:_:) ... | result |
|
||||
| test.swift:275:15:275:27 | ... ??(_:_:) ... | test.swift:259:12:259:19 | call to source() | test.swift:275:15:275:27 | ... ??(_:_:) ... | result |
|
||||
| test.swift:275:15:275:27 | ... ??(_:_:) ... | test.swift:275:20:275:27 | call to source() | test.swift:275:15:275:27 | ... ??(_:_:) ... | result |
|
||||
| test.swift:277:15:277:27 | ... ??(_:_:) ... | test.swift:277:20:277:27 | call to source() | test.swift:277:15:277:27 | ... ??(_:_:) ... | result |
|
||||
| test.swift:279:15:279:31 | ... ? ... : ... | test.swift:259:12:259:19 | call to source() | test.swift:279:15:279:31 | ... ? ... : ... | result |
|
||||
| test.swift:280:15:280:38 | ... ? ... : ... | test.swift:259:12:259:19 | call to source() | test.swift:280:15:280:38 | ... ? ... : ... | result |
|
||||
| test.swift:280:15:280:38 | ... ? ... : ... | test.swift:280:31:280:38 | call to source() | test.swift:280:15:280:38 | ... ? ... : ... | result |
|
||||
|
||||
@@ -247,15 +247,19 @@
|
||||
| test.swift:272:15:272:25 | call to signum() | test.swift:272:15:272:25 | OptionalEvaluationExpr |
|
||||
| test.swift:274:15:274:15 | x | test.swift:274:15:274:20 | ... ??(_:_:) ... |
|
||||
| test.swift:274:15:274:15 | x | test.swift:275:15:275:15 | x |
|
||||
| test.swift:274:20:274:20 | 0 | test.swift:274:15:274:20 | ... ??(_:_:) ... |
|
||||
| test.swift:274:20:274:20 | { ... } | test.swift:274:15:274:20 | ... ??(_:_:) ... |
|
||||
| test.swift:275:15:275:15 | x | test.swift:275:15:275:27 | ... ??(_:_:) ... |
|
||||
| test.swift:275:15:275:15 | x | test.swift:279:15:279:15 | x |
|
||||
| test.swift:275:20:275:27 | call to source() | test.swift:275:15:275:27 | ... ??(_:_:) ... |
|
||||
| test.swift:275:20:275:27 | { ... } | test.swift:275:15:275:27 | ... ??(_:_:) ... |
|
||||
| test.swift:276:15:276:15 | y | test.swift:276:15:276:20 | ... ??(_:_:) ... |
|
||||
| test.swift:276:15:276:15 | y | test.swift:277:15:277:15 | y |
|
||||
| test.swift:276:20:276:20 | 0 | test.swift:276:15:276:20 | ... ??(_:_:) ... |
|
||||
| test.swift:276:20:276:20 | { ... } | test.swift:276:15:276:20 | ... ??(_:_:) ... |
|
||||
| test.swift:277:15:277:15 | y | test.swift:277:15:277:27 | ... ??(_:_:) ... |
|
||||
| test.swift:277:15:277:15 | y | test.swift:281:15:281:15 | y |
|
||||
| test.swift:277:20:277:27 | call to source() | test.swift:277:15:277:27 | ... ??(_:_:) ... |
|
||||
| test.swift:277:20:277:27 | { ... } | test.swift:277:15:277:27 | ... ??(_:_:) ... |
|
||||
| test.swift:279:15:279:15 | x | test.swift:279:26:279:26 | x |
|
||||
| test.swift:279:15:279:15 | x | test.swift:280:15:280:15 | x |
|
||||
|
||||
@@ -272,9 +272,9 @@ func test_optionals(y: Int?) {
|
||||
sink(opt: y?.signum())
|
||||
|
||||
sink(arg: x ?? 0) // $ flow=259
|
||||
sink(arg: x ?? source()) // $ flow=259 MISSING: flow=276
|
||||
sink(arg: x ?? source()) // $ flow=259 flow=275
|
||||
sink(arg: y ?? 0)
|
||||
sink(arg: y ?? source()) // $ MISSING: flow=278
|
||||
sink(arg: y ?? source()) // $ flow=277
|
||||
|
||||
sink(arg: x != nil ? x! : 0) // $ flow=259
|
||||
sink(arg: x != nil ? x! : source()) // $ flow=259 flow=280
|
||||
|
||||
Reference in New Issue
Block a user