Skip to content

Commit 5fe10ce

Browse files
committed
ASTDumper: Label "interface type" -> "interface_type".
1 parent 109e208 commit 5fe10ce

15 files changed

+65
-65
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,7 +2151,7 @@ namespace {
21512151
}
21522152

21532153
if (VD->hasInterfaceType()) {
2154-
printTypeField(VD->getInterfaceType(), Label::always("interface type"),
2154+
printTypeField(VD->getInterfaceType(), Label::always("interface_type"),
21552155
PrintOptions(), InterfaceTypeColor);
21562156
}
21572157

@@ -2342,7 +2342,7 @@ namespace {
23422342
IdentifierColor);
23432343
if (PD->hasInterfaceType()) {
23442344
printTypeField(PD->getInterfaceType(),
2345-
Label::always("interface type"), PrintOptions(),
2345+
Label::always("interface_type"), PrintOptions(),
23462346
InterfaceTypeColor);
23472347
}
23482348

test/Concurrency/async_main_resolution.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ extension MainProtocol {
6262
@main struct MyMain : AsyncMainProtocol {}
6363
#endif
6464

65-
// CHECK-IS-SYNC-LABEL: "MyMain" interface type="MyMain.Type"
66-
// CHECK-IS-SYNC: (func_decl implicit "$main()" interface type="(MyMain.Type) -> () -> ()"
65+
// CHECK-IS-SYNC-LABEL: "MyMain" interface_type="MyMain.Type"
66+
// CHECK-IS-SYNC: (func_decl implicit "$main()" interface_type="(MyMain.Type) -> () -> ()"
6767
// CHECK-IS-SYNC: (declref_expr implicit type="(MyMain.Type) -> () -> ()"
6868

69-
// CHECK-IS-ASYNC-LABEL: "MyMain" interface type="MyMain.Type"
70-
// CHECK-IS-ASYNC: (func_decl implicit "$main()" interface type="(MyMain.Type) -> () async -> ()"
69+
// CHECK-IS-ASYNC-LABEL: "MyMain" interface_type="MyMain.Type"
70+
// CHECK-IS-ASYNC: (func_decl implicit "$main()" interface_type="(MyMain.Type) -> () async -> ()"
7171
// CHECK-IS-ASYNC: (declref_expr implicit type="(MyMain.Type) -> () async -> ()"
7272

7373
// CHECK-IS-ERROR1: error: 'MyMain' is annotated with @main and must provide a main static function of type {{\(\) -> Void or \(\) throws -> Void|\(\) -> Void, \(\) throws -> Void, \(\) async -> Void, or \(\) async throws -> Void}}

test/Concurrency/async_sequence_existential.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ extension Error {
99
}
1010

1111
func test(seq: any AsyncSequence) async {
12-
// CHECK: "error" interface type="any Error"
12+
// CHECK: "error" interface_type="any Error"
1313
do {
1414
for try await _ in seq { }
1515
} catch {

test/Concurrency/where_clause_main_resolution.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ protocol App {
2222
// CHECK: (extension_decl range={{\[}}[[SOURCE_FILE]]:{{[0-9]+}}:{{[0-9]+}} - line:{{[0-9]+}}:{{[0-9]+}}{{\]}}
2323
// CHECK-NOT: where
2424
// CHECK-NEXT: (func_decl range={{\[}}[[SOURCE_FILE]]:[[DEFAULT_ASYNCHRONOUS_MAIN_LINE:[0-9]+]]:{{[0-9]+}} - line:{{[0-9]+}}:{{[0-9]+}}{{\]}} "main()"
25-
// CHECK-SAME: interface type="<Self where Self : App> (Self.Type) -> () async -> ()"
25+
// CHECK-SAME: interface_type="<Self where Self : App> (Self.Type) -> () async -> ()"
2626

2727
extension App where Configuration == Config1 {
28-
// CHECK-CONFIG1: (func_decl implicit "$main()" interface type="(MainType.Type) -> () -> ()"
28+
// CHECK-CONFIG1: (func_decl implicit "$main()" interface_type="(MainType.Type) -> () -> ()"
2929
// CHECK-CONFIG1: [[SOURCE_FILE]]:[[# @LINE+1 ]]
3030
static func main() { }
3131
}
3232

3333
extension App where Configuration == Config2 {
34-
// CHECK-CONFIG2: (func_decl implicit "$main()" interface type="(MainType.Type) -> () async -> ()"
34+
// CHECK-CONFIG2: (func_decl implicit "$main()" interface_type="(MainType.Type) -> () async -> ()"
3535
// CHECK-CONFIG2: [[SOURCE_FILE]]:[[# @LINE+1 ]]
3636
static func main() async { }
3737
}
3838

3939
extension App where Configuration == Config3 {
40-
// CHECK-CONFIG3-ASYNC: (func_decl implicit "$main()" interface type="(MainType.Type) -> () async -> ()"
40+
// CHECK-CONFIG3-ASYNC: (func_decl implicit "$main()" interface_type="(MainType.Type) -> () async -> ()"
4141
// CHECK-CONFIG3-ASYNC: [[SOURCE_FILE]]:[[DEFAULT_ASYNCHRONOUS_MAIN_LINE]]
4242
}
4343

test/Constraints/nil-coalescing-favoring.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ struct B {
66

77
struct A {
88
init(_ other: B) {}
9-
// CHECK: constructor_decl{{.*}}interface type="(A.Type) -> (B?) -> A"
9+
// CHECK: constructor_decl{{.*}}interface_type="(A.Type) -> (B?) -> A"
1010
init(_ other: B?) {
1111
// CHECK: dot_syntax_call_expr type="(B) -> A"
1212
self.init(other ?? ._none)

test/Constraints/result_builder_switch_with_vars.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ func tuplify<T>(@TupleBuilder body: (E) throws -> T) rethrows {
4949
tuplify {
5050
switch $0 {
5151
// CHECK: (case_body_variables
52-
// CHECK-NEXT: (var_decl implicit {{.*}} "a" interface type="String" let readImpl=stored immutable
52+
// CHECK-NEXT: (var_decl implicit {{.*}} "a" interface_type="String" let readImpl=stored immutable
5353
// CHECK-NEXT: (has_storage_attr implicit))
54-
// CHECK-NEXT: (var_decl implicit {{.*}} "b" interface type="Int" let readImpl=stored immutable
54+
// CHECK-NEXT: (var_decl implicit {{.*}} "b" interface_type="Int" let readImpl=stored immutable
5555
// CHECK-NEXT: (has_storage_attr implicit))
5656
case let .test(a, b):
5757
a
@@ -60,9 +60,9 @@ tuplify {
6060

6161
switch $0 {
6262
// CHECK: (case_body_variables
63-
// CHECK-NEXT: (var_decl implicit {{.*}} "a" interface type="String" let readImpl=stored immutable
63+
// CHECK-NEXT: (var_decl implicit {{.*}} "a" interface_type="String" let readImpl=stored immutable
6464
// CHECK-NEXT: (has_storage_attr implicit))
65-
// CHECK-NEXT: (var_decl implicit {{.*}} "b" interface type="Int" let readImpl=stored immutable
65+
// CHECK-NEXT: (var_decl implicit {{.*}} "b" interface_type="Int" let readImpl=stored immutable
6666
// CHECK-NEXT: (has_storage_attr implicit))
6767
case .test(let a, let b):
6868
a
@@ -71,21 +71,21 @@ tuplify {
7171

7272
switch $0 {
7373
// CHECK: (case_body_variables
74-
// CHECK-NEXT: (var_decl implicit {{.*}} "value" interface type="(a: String, b: Int)" let readImpl=stored immutable
74+
// CHECK-NEXT: (var_decl implicit {{.*}} "value" interface_type="(a: String, b: Int)" let readImpl=stored immutable
7575
case let .test((value)):
7676
value.a
7777
}
7878

7979
switch $0 {
8080
// CHECK: (case_body_variables
81-
// CHECK-NEXT: (var_decl implicit {{.*}} "value" interface type="(a: String, b: Int)" let readImpl=stored immutable
81+
// CHECK-NEXT: (var_decl implicit {{.*}} "value" interface_type="(a: String, b: Int)" let readImpl=stored immutable
8282
case let .test(value):
8383
value.a
8484
}
8585

8686
switch $0 {
8787
// CHECK: (case_body_variables
88-
// CHECK-NEXT: (var_decl implicit {{.*}} "value" interface type="(a: String, b: Int)" let readImpl=stored immutable
88+
// CHECK-NEXT: (var_decl implicit {{.*}} "value" interface_type="(a: String, b: Int)" let readImpl=stored immutable
8989
case .test(let value):
9090
value.a
9191
}

test/DWARFImporter/basic.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ import ObjCModule
2727

2828
let pureSwift = Int32(42)
2929
// FAIL-NOT: var_decl
30-
// CHECK: var_decl "pureSwift" {{.*}} type="Int32"
31-
// SWIFTONLY: var_decl "pureSwift" {{.*}} type="Int32"
30+
// CHECK: var_decl "pureSwift"{{.*}} interface_type="Int32"
31+
// SWIFTONLY: var_decl "pureSwift"{{.*}} interface_type="Int32"
3232

3333
let point = Point(x: 1, y: 2)
34-
// CHECK: var_decl "point" {{.*}} type="Point"
34+
// CHECK: var_decl "point"{{.*}} interface_type="Point"
3535
// SWIFTONLY-NOT: var_decl "point"
3636

test/Distributed/distributed_actor_executor_ast.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ distributed actor DefaultWorker {
2727
}
2828

2929
// Check DefaultWorker, the DefaultActor version of the synthesis:
30-
// CHECK: (class_decl range=[{{.*}}] "DefaultWorker" interface type="DefaultWorker.Type" access=internal non_resilient distributed actor
30+
// CHECK: (class_decl range=[{{.*}}] "DefaultWorker" interface_type="DefaultWorker.Type" access=internal non_resilient distributed actor
3131
// The unowned executor property:
32-
// CHECK: (var_decl implicit "unownedExecutor" interface type="UnownedSerialExecutor" access=internal final readImpl=getter immutable
32+
// CHECK: (var_decl implicit "unownedExecutor" interface_type="UnownedSerialExecutor" access=internal final readImpl=getter immutable
3333

3434
// We guard the rest of the body; we only return a default executor if the actor is local:
3535
// CHECK: (guard_stmt implicit

test/Frontend/dump-parse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ enum TrailingSemi {
5555
};
5656

5757
// The substitution map for a declref should be relatively unobtrusive.
58-
// CHECK-AST-LABEL: (func_decl{{.*}}"generic(_:)" "<T : Hashable>" interface type="<T where T : Hashable> (T) -> ()" access=internal captures=(<generic> )
58+
// CHECK-AST-LABEL: (func_decl{{.*}}"generic(_:)" "<T : Hashable>" interface_type="<T where T : Hashable> (T) -> ()" access=internal captures=(<generic> )
5959
func generic<T: Hashable>(_: T) {}
6060
// CHECK-AST: (pattern_binding_decl
6161
// CHECK-AST: (processed_init=declref_expr type="(Int) -> ()" location={{.*}} range={{.*}} decl="main.(file).generic@{{.*}} [with (substitution_map generic_signature=<T where T : Hashable> T -> Int)]" function_ref=unapplied))

test/attr/ApplicationMain/attr_main_throws.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct MyBase {
77
}
88
}
99

10-
// CHECK-AST: (func_decl implicit "$main()" interface type="(MyBase.Type) -> () throws -> ()" access=internal static
10+
// CHECK-AST: (func_decl implicit "$main()" interface_type="(MyBase.Type) -> () throws -> ()" access=internal static
1111
// CHECK-AST-NEXT: (parameter "self")
1212
// CHECK-AST-NEXT: (parameter_list)
1313
// CHECK-AST-NEXT: (brace_stmt implicit

0 commit comments

Comments
 (0)