File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
library-tests/dataflow/capture Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ closures.swift:
18
18
# 7| getInit(0): [CallExpr] call to hello()
19
19
# 7| getFunction(): [DeclRefExpr] hello()
20
20
# 7| getPattern(0): [NamedPattern] x
21
+ # 7| getVariable(0): [ConcreteVarDecl] x
22
+ # 7| Type = String
21
23
# 7| getClosureBody(): [ExplicitClosureExpr] { ... }
22
24
# 7| getBody(): [BraceStmt] { ... }
23
25
# 8| getElement(0): [CallExpr] call to print(_:separator:terminator:)
@@ -44,8 +46,6 @@ closures.swift:
44
46
# 9| getExpr(): [DefaultArgumentExpr] default terminator
45
47
# 8| getCapture(0): [CapturedDecl] x
46
48
# 9| getCapture(1): [CapturedDecl] y
47
- # 7| [ConcreteVarDecl] x
48
- # 7| Type = String
49
49
# 12| [TopLevelCodeDecl] { ... }
50
50
# 12| getBody(): [BraceStmt] { ... }
51
51
# 12| getElement(0): [PatternBindingDecl] var ... = ...
Original file line number Diff line number Diff line change @@ -214,6 +214,8 @@ v5.8.swift:
214
214
# 37| getInit(0): [DeclRefExpr] self
215
215
# 37| getInit(0).getFullyConverted(): [InjectIntoOptionalExpr] (ViewController?) ...
216
216
# 37| getPattern(0): [NamedPattern] self
217
+ # 37| getVariable(0): [ConcreteVarDecl] self
218
+ # 37| Type = ViewController?
217
219
# 37| getClosureBody(): [ExplicitClosureExpr] { ... }
218
220
# 37| getBody(): [BraceStmt] { ... }
219
221
# 38| getElement(0): [GuardStmt] guard ... else { ... }
@@ -248,8 +250,6 @@ v5.8.swift:
248
250
# 33| Type = ViewController
249
251
# 33| getBody(): [BraceStmt] { ... }
250
252
# 33| getElement(0): [ReturnStmt] return
251
- # 37| [ConcreteVarDecl] self
252
- # 37| Type = ViewController?
253
253
# 38| [ConcreteVarDecl] self
254
254
# 38| Type = ViewController
255
255
# 39| [Comment] // refers to `self.dismiss()`
Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ class S {
177
177
178
178
f ( source ( " captureThis " , 2 ) ) ;
179
179
180
- sink ( bf1) ; // $ MISSING: hasValueFlow
181
- sink ( self . bf2) ; // $ MISSING: hasValueFlow
180
+ sink ( bf1) ; // $ hasValueFlow=captureThis
181
+ sink ( self . bf2) ; // $ hasValueFlow=captureThis
182
182
}
183
183
}
184
184
You can’t perform that action at this time.
0 commit comments