mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Swift: fix tests
This commit is contained in:
@@ -18,6 +18,8 @@ closures.swift:
|
||||
# 7| getInit(0): [CallExpr] call to hello()
|
||||
# 7| getFunction(): [DeclRefExpr] hello()
|
||||
# 7| getPattern(0): [NamedPattern] x
|
||||
# 7| getVariable(0): [ConcreteVarDecl] x
|
||||
# 7| Type = String
|
||||
# 7| getClosureBody(): [ExplicitClosureExpr] { ... }
|
||||
# 7| getBody(): [BraceStmt] { ... }
|
||||
# 8| getElement(0): [CallExpr] call to print(_:separator:terminator:)
|
||||
@@ -44,8 +46,6 @@ closures.swift:
|
||||
# 9| getExpr(): [DefaultArgumentExpr] default terminator
|
||||
# 8| getCapture(0): [CapturedDecl] x
|
||||
# 9| getCapture(1): [CapturedDecl] y
|
||||
# 7| [ConcreteVarDecl] x
|
||||
# 7| Type = String
|
||||
# 12| [TopLevelCodeDecl] { ... }
|
||||
# 12| getBody(): [BraceStmt] { ... }
|
||||
# 12| getElement(0): [PatternBindingDecl] var ... = ...
|
||||
|
||||
@@ -214,6 +214,8 @@ v5.8.swift:
|
||||
# 37| getInit(0): [DeclRefExpr] self
|
||||
# 37| getInit(0).getFullyConverted(): [InjectIntoOptionalExpr] (ViewController?) ...
|
||||
# 37| getPattern(0): [NamedPattern] self
|
||||
# 37| getVariable(0): [ConcreteVarDecl] self
|
||||
# 37| Type = ViewController?
|
||||
# 37| getClosureBody(): [ExplicitClosureExpr] { ... }
|
||||
# 37| getBody(): [BraceStmt] { ... }
|
||||
# 38| getElement(0): [GuardStmt] guard ... else { ... }
|
||||
@@ -248,8 +250,6 @@ v5.8.swift:
|
||||
# 33| Type = ViewController
|
||||
# 33| getBody(): [BraceStmt] { ... }
|
||||
# 33| getElement(0): [ReturnStmt] return
|
||||
# 37| [ConcreteVarDecl] self
|
||||
# 37| Type = ViewController?
|
||||
# 38| [ConcreteVarDecl] self
|
||||
# 38| Type = ViewController
|
||||
# 39| [Comment] // refers to `self.dismiss()`
|
||||
|
||||
@@ -177,8 +177,8 @@ class S {
|
||||
|
||||
f(source("captureThis", 2));
|
||||
|
||||
sink(bf1); // $ MISSING: hasValueFlow
|
||||
sink(self.bf2); // $ MISSING: hasValueFlow
|
||||
sink(bf1); // $ hasValueFlow=captureThis
|
||||
sink(self.bf2); // $ hasValueFlow=captureThis
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user