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:
1818# 7| getInit(0): [CallExpr] call to hello()
1919# 7| getFunction(): [DeclRefExpr] hello()
2020# 7| getPattern(0): [NamedPattern] x
21+ # 7| getVariable(0): [ConcreteVarDecl] x
22+ # 7| Type = String
2123# 7| getClosureBody(): [ExplicitClosureExpr] { ... }
2224# 7| getBody(): [BraceStmt] { ... }
2325# 8| getElement(0): [CallExpr] call to print(_:separator:terminator:)
@@ -44,8 +46,6 @@ closures.swift:
4446# 9| getExpr(): [DefaultArgumentExpr] default terminator
4547# 8| getCapture(0): [CapturedDecl] x
4648# 9| getCapture(1): [CapturedDecl] y
47- # 7| [ConcreteVarDecl] x
48- # 7| Type = String
4949# 12| [TopLevelCodeDecl] { ... }
5050# 12| getBody(): [BraceStmt] { ... }
5151# 12| getElement(0): [PatternBindingDecl] var ... = ...
Original file line number Diff line number Diff line change @@ -214,6 +214,8 @@ v5.8.swift:
214214# 37| getInit(0): [DeclRefExpr] self
215215# 37| getInit(0).getFullyConverted(): [InjectIntoOptionalExpr] (ViewController?) ...
216216# 37| getPattern(0): [NamedPattern] self
217+ # 37| getVariable(0): [ConcreteVarDecl] self
218+ # 37| Type = ViewController?
217219# 37| getClosureBody(): [ExplicitClosureExpr] { ... }
218220# 37| getBody(): [BraceStmt] { ... }
219221# 38| getElement(0): [GuardStmt] guard ... else { ... }
@@ -248,8 +250,6 @@ v5.8.swift:
248250# 33| Type = ViewController
249251# 33| getBody(): [BraceStmt] { ... }
250252# 33| getElement(0): [ReturnStmt] return
251- # 37| [ConcreteVarDecl] self
252- # 37| Type = ViewController?
253253# 38| [ConcreteVarDecl] self
254254# 38| Type = ViewController
255255# 39| [Comment] // refers to `self.dismiss()`
Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ class S {
177177
178178 f ( source ( " captureThis " , 2 ) ) ;
179179
180- sink ( bf1) ; // $ MISSING: hasValueFlow
181- sink ( self . bf2) ; // $ MISSING: hasValueFlow
180+ sink ( bf1) ; // $ hasValueFlow=captureThis
181+ sink ( self . bf2) ; // $ hasValueFlow=captureThis
182182 }
183183}
184184
You can’t perform that action at this time.
0 commit comments