Skip to content

Commit

Permalink
Swift: temporarily accept test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Paolo Tranquilli committed Oct 31, 2024
1 parent 5a045be commit 1f35607
Show file tree
Hide file tree
Showing 29 changed files with 121 additions and 176 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
| file://:0:0:0:0 | ... .combine(_:) |
| unresolved.swift:5:1:5:14 | UnresolvedSpecializeExpr |
| unresolved.swift:5:1:5:14 | UnresolvedSpecializeExpr | UnresolvedSpecializeExpr |
3 changes: 1 addition & 2 deletions swift/ql/test/extractor-tests/expressions/all.expected
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
| expressions.swift:6:9:6:9 | hello world | StringLiteralExpr |
| expressions.swift:7:10:7:10 | "..." | InterpolatedStringLiteralExpr |
| expressions.swift:7:10:7:10 | OpaqueValueExpr | OpaqueValueExpr |
| expressions.swift:7:10:7:10 | TapExpr | TapExpr |
| expressions.swift:7:10:7:10 | hello | StringLiteralExpr |
| expressions.swift:7:10:7:21 | TapExpr | TapExpr |
| expressions.swift:7:11:7:10 | call to appendLiteral(_:) | CallExpr |
| expressions.swift:7:11:7:11 | $interpolation | DeclRefExpr |
| expressions.swift:7:11:7:11 | &... | InOutExpr |
Expand Down Expand Up @@ -133,7 +133,6 @@
| expressions.swift:60:1:60:63 | call to withUnsafePointer(to:_:) | CallExpr |
| expressions.swift:60:23:60:23 | (Int) ... | LoadExpr |
| expressions.swift:60:23:60:23 | myNumber | DeclRefExpr |
| expressions.swift:60:33:60:63 | ((UnsafePointer<Int>) throws -> ()) ... | FunctionConversionExpr |
| expressions.swift:60:33:60:63 | { ... } | ExplicitClosureExpr |
| expressions.swift:60:35:60:35 | unsafeFunction(pointer:) | DeclRefExpr |
| expressions.swift:60:35:60:61 | call to unsafeFunction(pointer:) | CallExpr |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ closures.swift:
# 42| getArgument(2): [Argument] terminator: default terminator
# 42| getExpr(): [DefaultArgumentExpr] default terminator
# 42| getCapture(0): [CapturedDecl] wrapper(_:)
# 41| getExpr().getFullyConverted(): [FunctionConversionExpr] (@isolated(any) () async -> ()) ...
# 45| getElement(1): [CallExpr] call to withCallback(_:)
# 45| getFunction(): [DeclRefExpr] withCallback(_:)
# 45| getArgument(0): [Argument] : { ... }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| test.swift:2:1:2:50 | MacroDecl | 0 | test.swift:1:14:1:26 | #freestanding(declaration) |
| test.swift:4:1:4:15 | MacroDecl | 0 | test.swift:3:14:3:25 | #freestanding(expression) |
| test.swift:7:1:7:15 | MacroDecl | 0 | test.swift:6:10:6:20 | @attached(extension) |
| test.swift:7:1:7:15 | MacroDecl | 1 | test.swift:5:10:5:17 | @attached(member) |
| test.swift:2:1:2:50 | MacroDecl | 0 | test.swift:1:2:1:26 | #freestanding(declaration) |
| test.swift:4:1:4:15 | MacroDecl | 0 | test.swift:3:2:3:25 | #freestanding(expression) |
| test.swift:7:1:7:15 | MacroDecl | 0 | test.swift:6:2:6:20 | @attached(extension) |
| test.swift:7:1:7:15 | MacroDecl | 1 | test.swift:5:2:5:17 | @attached(member) |
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| test.swift:1:14:1:26 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| test.swift:3:14:3:25 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| test.swift:5:10:5:17 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| test.swift:6:10:6:20 | @attached(extension) | getKind: | 256 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| file://:0:0:0:0 | @attached(accessor) | getKind: | 4 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| file://:0:0:0:0 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| file://:0:0:0:0 | @attached(memberAttribute) | getKind: | 8 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 1 |
| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 1 |
| test.swift:1:2:1:26 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| test.swift:3:2:3:25 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| test.swift:5:2:5:17 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
| test.swift:6:2:6:20 | @attached(extension) | getKind: | 256 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
| file://:0:0:0:0 | @attached(peer) | 0 | $() |
| file://:0:0:0:0 | @attached(peer) | 0 | _lldb_summary() |
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| key_path_expr.swift:11:12:11:17 | #keyPath(...) | key_path_expr.swift:11:13:11:13 | Foo |
| key_path_expr.swift:12:18:12:26 | #keyPath(...) | key_path_expr.swift:12:19:12:23 | [Int] |
| key_path_expr.swift:13:19:13:38 | #keyPath(...) | key_path_expr.swift:13:20:13:33 | [String : Int] |
| key_path_expr.swift:14:16:14:35 | #keyPath(...) | key_path_expr.swift:14:17:14:29 | Int? |
| key_path_expr.swift:14:16:14:35 | #keyPath(...) | key_path_expr.swift:14:17:14:29 | Optional<Int> |
| key_path_expr.swift:15:16:15:26 | #keyPath(...) | key_path_expr.swift:15:17:15:17 | Foo |
| key_path_expr.swift:16:20:16:30 | #keyPath(...) | key_path_expr.swift:16:21:16:21 | Foo |
| key_path_expr.swift:17:11:17:16 | #keyPath(...) | key_path_expr.swift:17:12:17:12 | Int |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| key_path_expr.swift:11:12:11:17 | #keyPath(...) | WritableKeyPath<Foo, Int> |
| key_path_expr.swift:12:18:12:26 | #keyPath(...) | WritableKeyPath<[Int], Int> |
| key_path_expr.swift:13:19:13:38 | #keyPath(...) | WritableKeyPath<[String : Int], Int?> |
| key_path_expr.swift:14:16:14:35 | #keyPath(...) | WritableKeyPath<Int?, Int> |
| key_path_expr.swift:14:16:14:35 | #keyPath(...) | WritableKeyPath<Optional<Int>, Int> |
| key_path_expr.swift:15:16:15:26 | #keyPath(...) | KeyPath<Foo, Int?> |
| key_path_expr.swift:16:20:16:30 | #keyPath(...) | KeyPath<Foo, Int?> |
| key_path_expr.swift:17:11:17:16 | #keyPath(...) | WritableKeyPath<Int, Int> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
| method_lookups.swift:37:11:37:11 | X.init() | () -> X |
| method_lookups.swift:37:11:37:15 | (no string representation) | (Int) -> () |
| method_lookups.swift:37:15:37:15 | .baz(_:) | (Int) -> () |
| method_lookups.swift:40:1:40:1 | Task<Success, Never>.init(priority:operation:) | (TaskPriority?, __owned @escaping @Sendable () async -> ()) -> Task<(), Never> |
| method_lookups.swift:40:1:40:1 | Task<Success, Never>.init(priority:operation:) | (TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> |
| method_lookups.swift:41:3:41:5 | .foo(_:_:) | (Int, Int) -> () |
| method_lookups.swift:42:9:42:9 | Y.init() | () -> Y |
| method_lookups.swift:42:9:42:13 | .baz(_:) | (Int) -> () |
| method_lookups.swift:44:11:44:13 | .foo(_:_:) | (Int, Int) -> () |
| method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(priority:operation:) | (TaskPriority?, __owned @escaping @Sendable () async -> ()) -> Task<(), Never> |
| method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(priority:operation:) | (TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> |
| method_lookups.swift:48:9:48:11 | .foo(_:_:) | @MainActor (Int, Int) -> () |
| method_lookups.swift:49:9:49:11 | .bar() | () -> () |
| method_lookups.swift:50:9:50:9 | Z.init() | @MainActor () -> Z |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| some Base | getName: | some Base | getCanonicalType: | some Base | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | yes | getNumberOfProtocols: | 0 | getDeclaration: | file://:0:0:0:0 | _ |
| some P | getName: | some P | getCanonicalType: | some P | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 1 | getDeclaration: | file://:0:0:0:0 | _ |
| some P | getName: | some P | getCanonicalType: | some P | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 1 | getDeclaration: | file://:0:0:0:0 | _ |
| some SignedInteger | getName: | some SignedInteger | getCanonicalType: | some SignedInteger | getInterfaceType: | \u03c4_0_0 | hasSuperclass: | no | getNumberOfProtocols: | 11 | getDeclaration: | file://:0:0:0:0 | _ |
| some SignedInteger | getName: | some SignedInteger | getCanonicalType: | some SignedInteger | getInterfaceType: | \u03c4_0_0 | hasSuperclass: | no | getNumberOfProtocols: | 1 | getDeclaration: | file://:0:0:0:0 | _ |
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
| some P | 0 | opaque_types.swift:3:1:3:13 | P |
| some P | 0 | opaque_types.swift:3:1:3:13 | P |
| some SignedInteger | 0 | file://:0:0:0:0 | SignedInteger |
| some SignedInteger | 1 | file://:0:0:0:0 | BinaryInteger |
| some SignedInteger | 2 | file://:0:0:0:0 | SignedNumeric |
| some SignedInteger | 3 | file://:0:0:0:0 | CustomStringConvertible |
| some SignedInteger | 4 | file://:0:0:0:0 | Hashable |
| some SignedInteger | 5 | file://:0:0:0:0 | Numeric |
| some SignedInteger | 6 | file://:0:0:0:0 | Strideable |
| some SignedInteger | 7 | file://:0:0:0:0 | Equatable |
| some SignedInteger | 8 | file://:0:0:0:0 | AdditiveArithmetic |
| some SignedInteger | 9 | file://:0:0:0:0 | ExpressibleByIntegerLiteral |
| some SignedInteger | 10 | file://:0:0:0:0 | Comparable |
Original file line number Diff line number Diff line change
@@ -1 +1 @@
| \u03c4_1_0 | getName: | \u03c4_1_0 | getCanonicalType: | \u03c4_1_0 | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 0 |
| \u03c4_1_0 | getName: | \u03c4_1_0 | getCanonicalType: | \u03c4_1_0 | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 2 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
| \u03c4_1_0 | 0 | file://:0:0:0:0 | Copyable |
| \u03c4_1_0 | 1 | file://:0:0:0:0 | Escapable |
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
| each T | getName: | each T | getCanonicalType: | each T | getInterfaceType: | each T | hasSuperclass: | no | getNumberOfProtocols: | 0 |
| each Arg | getName: | each Arg | getCanonicalType: | each Arg | getInterfaceType: | each Arg | hasSuperclass: | no | getNumberOfProtocols: | 2 |
| each T | getName: | each T | getCanonicalType: | each T | getInterfaceType: | each T | hasSuperclass: | no | getNumberOfProtocols: | 2 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
| each Arg | 0 | file://:0:0:0:0 | Copyable |
| each Arg | 1 | file://:0:0:0:0 | Escapable |
| each T | 0 | file://:0:0:0:0 | Copyable |
| each T | 1 | file://:0:0:0:0 | Escapable |
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | hasSuperclass: | no | getNumberOfProtocols: | 1 |
| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | hasSuperclass: | yes | getNumberOfProtocols: | 0 |
| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | hasSuperclass: | yes | getNumberOfProtocols: | 0 |
| Param | getName: | Param | getCanonicalType: | Param | getInterfaceType: | Param | hasSuperclass: | no | getNumberOfProtocols: | 0 |
| Param | getName: | Param | getCanonicalType: | Param | getInterfaceType: | Param | hasSuperclass: | no | getNumberOfProtocols: | 2 |
| ParamWithProtocols | getName: | ParamWithProtocols | getCanonicalType: | ParamWithProtocols | getInterfaceType: | ParamWithProtocols | hasSuperclass: | no | getNumberOfProtocols: | 2 |
| ParamWithSuperclass | getName: | ParamWithSuperclass | getCanonicalType: | ParamWithSuperclass | getInterfaceType: | ParamWithSuperclass | hasSuperclass: | yes | getNumberOfProtocols: | 0 |
| ParamWithSuperclassAndProtocols | getName: | ParamWithSuperclassAndProtocols | getCanonicalType: | ParamWithSuperclassAndProtocols | getInterfaceType: | ParamWithSuperclassAndProtocols | hasSuperclass: | yes | getNumberOfProtocols: | 2 |
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
| Base | 0 | primary_archetypes.swift:4:1:4:13 | P |
| Base | 0 | primary_archetypes.swift:5:1:5:14 | P2 |
| Param | 0 | file://:0:0:0:0 | Copyable |
| Param | 1 | file://:0:0:0:0 | Escapable |
| ParamWithProtocols | 0 | file://:0:0:0:0 | Equatable |
| ParamWithProtocols | 1 | primary_archetypes.swift:4:1:4:13 | P |
| ParamWithSuperclassAndProtocols | 0 | file://:0:0:0:0 | Equatable |
Expand Down
8 changes: 4 additions & 4 deletions swift/ql/test/library-tests/ast/PrintAst.expected
Original file line number Diff line number Diff line change
Expand Up @@ -3291,6 +3291,7 @@ cfg.swift:
# 529| getBase(): [DeclRefExpr] continuation
# 529| getMethodRef(): [DeclRefExpr] finish()
# 527| getCapture(0): [CapturedDecl] continuation
# 525| getExpr().getFullyConverted(): [FunctionConversionExpr] (@isolated(any) () async -> ()) ...
# 523| getPattern(0): [NamedPattern] stream
# 533| getElement(1): [ForEachStmt] for ... in ... { ... }
# 533| getPattern(): [NamedPattern] i
Expand All @@ -3306,7 +3307,7 @@ cfg.swift:
# 533| getBase(): [DeclRefExpr] $i$generator
# 533| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] next()
#-----| getNextCall().getFullyConverted(): [AwaitExpr] await ...
# 533| getNextCall().getFullyConverted(): [AwaitExpr] await ...
# 533| getBody(): [BraceStmt] { ... }
# 534| getElement(0): [CallExpr] call to print(_:separator:terminator:)
# 534| getFunction(): [DeclRefExpr] print(_:separator:terminator:)
Expand Down Expand Up @@ -5137,7 +5138,6 @@ expressions.swift:
# 60| getFunction(): [DeclRefExpr] unsafeFunction(pointer:)
# 60| getArgument(0): [Argument] pointer: $0
# 60| getExpr(): [DeclRefExpr] $0
# 60| getExpr().getFullyConverted(): [FunctionConversionExpr] ((UnsafePointer<Int>) throws -> ()) ...
# 62| [ClassDecl] FailingToInit
# 63| getMember(0): [Initializer] FailingToInit.init(x:)
# 63| InterfaceType = (FailingToInit.Type) -> (Int) -> FailingToInit?
Expand Down Expand Up @@ -5972,12 +5972,12 @@ expressions.swift:
# 179| getBody(): [BraceStmt] { ... }
# 179| getElement(0): [PatternBindingDecl] var ... = ...
# 179| getInit(0): [KeyPathExpr] #keyPath(...)
# 179| getRoot(): [TypeRepr] Int?
# 179| getRoot(): [TypeRepr] Optional<Int>
# 179| getComponent(0): [KeyPathComponent] KeyPathComponent
# 179| getComponent(1): [KeyPathComponent] KeyPathComponent
# 179| getPattern(0): [NamedPattern] optForce
# 179| [ConcreteVarDecl] optForce
# 179| Type = WritableKeyPath<Int?, Int>
# 179| Type = WritableKeyPath<Optional<Int>, Int>
# 180| [TopLevelCodeDecl] { ... }
# 180| getBody(): [BraceStmt] { ... }
# 180| getElement(0): [PatternBindingDecl] var ... = ...
Expand Down
Loading

0 comments on commit 1f35607

Please sign in to comment.