Skip to content

Commit 18dc9c1

Browse files
committed
[CodeCompletion] Remove CodeComletionString::getName()
`CodeCompletioString::getName()` was used only as the sorting keys in `CodeCompletionContext::sortCompletionResults()` which is effectively deprecated. There's no reason to check them in `swift-ide-test`. Instead, check `printCodeCompletionResultFilterName()` that is actually used for filtering.
1 parent 0441183 commit 18dc9c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+290
-333
lines changed

include/swift/IDE/CodeCompletion.h

-3
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,6 @@ class alignas(detail::CodeCompletionStringChunk) CodeCompletionString final :
362362
Optional<unsigned>
363363
getFirstTextChunkIndex(bool includeLeadingPunctuation = false) const;
364364

365-
/// Concatenates all text chunks considered part of the name to \p OS.
366-
void getName(raw_ostream &OS) const;
367-
368365
/// Print a debug representation of the code completion string to \p OS.
369366
void print(raw_ostream &OS) const;
370367
SWIFT_DEBUG_DUMP;

lib/IDE/CodeCompletion.cpp

+3-43
Original file line numberDiff line numberDiff line change
@@ -1443,44 +1443,6 @@ CodeCompletionString::getFirstTextChunk(bool includeLeadingPunctuation) const {
14431443
return StringRef();
14441444
}
14451445

1446-
void CodeCompletionString::getName(raw_ostream &OS) const {
1447-
auto FirstTextChunk = getFirstTextChunkIndex();
1448-
int TextSize = 0;
1449-
if (FirstTextChunk.hasValue()) {
1450-
auto chunks = getChunks().slice(*FirstTextChunk);
1451-
1452-
for (auto i = chunks.begin(), e = chunks.end(); i != e; ++i) {
1453-
using ChunkKind = Chunk::ChunkKind;
1454-
1455-
bool shouldPrint = !i->isAnnotation();
1456-
switch (i->getKind()) {
1457-
case ChunkKind::TypeAnnotation:
1458-
case ChunkKind::CallParameterClosureType:
1459-
case ChunkKind::CallParameterClosureExpr:
1460-
case ChunkKind::DeclAttrParamColon:
1461-
case ChunkKind::OptionalMethodCallTail:
1462-
continue;
1463-
case ChunkKind::TypeAnnotationBegin: {
1464-
auto level = i->getNestingLevel();
1465-
do { ++i; } while (i != e && !i->endsPreviousNestedGroup(level));
1466-
--i;
1467-
continue;
1468-
}
1469-
case ChunkKind::EffectsSpecifierKeyword:
1470-
shouldPrint = true; // Even when they're annotations.
1471-
break;
1472-
default:
1473-
break;
1474-
}
1475-
1476-
if (i->hasText() && shouldPrint) {
1477-
TextSize += i->getText().size();
1478-
OS << i->getText();
1479-
}
1480-
}
1481-
}
1482-
}
1483-
14841446
void CodeCompletionContext::sortCompletionResults(
14851447
MutableArrayRef<CodeCompletionResult *> Results) {
14861448
struct ResultAndName {
@@ -1495,7 +1457,7 @@ void CodeCompletionContext::sortCompletionResults(
14951457
auto *result = Results[i];
14961458
nameCache[i].result = result;
14971459
llvm::raw_string_ostream OS(nameCache[i].name);
1498-
result->getCompletionString()->getName(OS);
1460+
printCodeCompletionResultFilterName(*result, OS);
14991461
OS.flush();
15001462
}
15011463

@@ -7428,10 +7390,8 @@ void PrintingCodeCompletionConsumer::handleResults(
74287390
Result->getCompletionString()->print(OS);
74297391
}
74307392

7431-
llvm::SmallString<64> Name;
7432-
llvm::raw_svector_ostream NameOs(Name);
7433-
Result->getCompletionString()->getName(NameOs);
7434-
OS << "; name=" << Name;
7393+
OS << "; name=";
7394+
printCodeCompletionResultFilterName(*Result, OS);
74357395

74367396
StringRef comment = Result->getBriefDocComment();
74377397
if (IncludeComments && !comment.empty()) {

test/IDE/complete_after_self.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ class ThisDerived1 : ThisBase1 {
139139
self.#^CONVENIENCE_SELF_DOT_1?check=CONVENIENCE_SELF_DOT_1;check=COMMON_SELF_DOT_1^#
140140
// CONVENIENCE_SELF_DOT_1: Begin completions, 20 items
141141
// CONVENIENCE_SELF_DOT_1-DAG: Decl[Constructor]/CurrNominal: init()[#ThisDerived1#]; name=init()
142-
// CONVENIENCE_SELF_DOT_1-DAG: Decl[Constructor]/CurrNominal: init({#a: Int#})[#ThisDerived1#]; name=init(a: Int)
143-
// CONVENIENCE_SELF_DOT_1-DAG: Decl[Constructor]/CurrNominal: init({#conv: Int#})[#ThisDerived1#]; name=init(conv: Int)
142+
// CONVENIENCE_SELF_DOT_1-DAG: Decl[Constructor]/CurrNominal: init({#a: Int#})[#ThisDerived1#]; name=init(a:)
143+
// CONVENIENCE_SELF_DOT_1-DAG: Decl[Constructor]/CurrNominal: init({#conv: Int#})[#ThisDerived1#]; name=init(conv:)
144144
// CONVENIENCE_SELF_DOT_1: End completions
145145
}
146146

@@ -273,8 +273,8 @@ extension ThisDerived1 {
273273
self.#^EXTENSION_CONSTRUCTOR_SELF_DOT_1?check=COMMON_SELF_DOT_1;check=EXTENSION_CONSTRUCTOR_SELF_DOT_1^#
274274
// EXTENSION_CONSTRUCTOR_SELF_DOT_1: Begin completions, 20 items
275275
// EXTENSION_CONSTRUCTOR_SELF_DOT_1: Decl[Constructor]/CurrNominal: init()[#ThisDerived1#]; name=init()
276-
// EXTENSION_CONSTRUCTOR_SELF_DOT_1: Decl[Constructor]/CurrNominal: init({#a: Int#})[#ThisDerived1#]; name=init(a: Int)
277-
// EXTENSION_CONSTRUCTOR_SELF_DOT_1: Decl[Constructor]/CurrNominal: init({#someExtensionArg: Int#})[#ThisDerived1#]; name=init(someExtensionArg: Int)
276+
// EXTENSION_CONSTRUCTOR_SELF_DOT_1: Decl[Constructor]/CurrNominal: init({#a: Int#})[#ThisDerived1#]; name=init(a:)
277+
// EXTENSION_CONSTRUCTOR_SELF_DOT_1: Decl[Constructor]/CurrNominal: init({#someExtensionArg: Int#})[#ThisDerived1#]; name=init(someExtensionArg:)
278278
// EXTENSION_CONSTRUCTOR_SELF_DOT_1: End completions
279279

280280
}
@@ -287,7 +287,7 @@ struct S1 {
287287
// STRUCT_CONSTRUCTOR_SELF_DOT_1: Begin completions, 4 items
288288
// STRUCT_CONSTRUCTOR_SELF_DOT_1-DAG: Keyword[self]/CurrNominal: self[#S1#]; name=self
289289
// STRUCT_CONSTRUCTOR_SELF_DOT_1-DAG: Decl[Constructor]/CurrNominal: init()[#S1#]; name=init()
290-
// STRUCT_CONSTRUCTOR_SELF_DOT_1-DAG: Decl[Constructor]/CurrNominal: init({#x: Int#})[#S1#]; name=init(x: Int)
290+
// STRUCT_CONSTRUCTOR_SELF_DOT_1-DAG: Decl[Constructor]/CurrNominal: init({#x: Int#})[#S1#]; name=init(x:)
291291
// STRUCT_CONSTRUCTOR_SELF_DOT_1-DAG: Decl[InstanceMethod]/CurrNominal: f()[#Void#]; name=f()
292292
// STRUCT_CONSTRUCTOR_SELF_DOT_1: End completions
293293
let s: S1

test/IDE/complete_ambiguous.swift

+12-12
Original file line numberDiff line numberDiff line change
@@ -287,32 +287,32 @@ func testMissingArgs() {
287287

288288
// MISSINGARG_INLINE: Begin completions, 14 items
289289
// MISSINGARG_INLINE-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: foo[#Foo#]; name=foo
290-
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Foo#})[#(into: inout Hasher) -> Void#]; name=hash(self: Foo)
290+
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Foo#})[#(into: inout Hasher) -> Void#]; name=hash(:)
291291
// MISSINGARG_INLINE-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: bar[#Bar#]; name=bar
292-
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bar#})[#(into: inout Hasher) -> Void#]; name=hash(self: Bar)
292+
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bar#})[#(into: inout Hasher) -> Void#]; name=hash(:)
293293
// MISSINGARG_INLINE-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: bop[#Bop#]; name=bop
294-
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bop#})[#(into: inout Hasher) -> Void#]; name=hash(self: Bop)
294+
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bop#})[#(into: inout Hasher) -> Void#]; name=hash(:)
295295
// MISSINGARG_INLINE-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: bix[#Bix#]; name=bix
296-
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bix#})[#(into: inout Hasher) -> Void#]; name=hash(self: Bix)
296+
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bix#})[#(into: inout Hasher) -> Void#]; name=hash(:)
297297
// MISSINGARG_INLINE-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: boy[#Boy#]; name=boy
298-
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Boy#})[#(into: inout Hasher) -> Void#]; name=hash(self: Boy)
298+
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Boy#})[#(into: inout Hasher) -> Void#]; name=hash(:)
299299
// MISSINGARG_INLINE-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: blu[#Blu#]; name=blu
300-
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Blu#})[#(into: inout Hasher) -> Void#]; name=hash(self: Blu)
300+
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Blu#})[#(into: inout Hasher) -> Void#]; name=hash(:)
301301
// MISSINGARG_INLINE-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: baz[#Baz#]; name=baz
302-
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Baz#})[#(into: inout Hasher) -> Void#]; name=hash(self: Baz)
302+
// MISSINGARG_INLINE-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Baz#})[#(into: inout Hasher) -> Void#]; name=hash(:)
303303
// MISSINGARG_INLINE: End completions
304304

305305
// MISSINGARG_TRAILING: Begin completions, 10 items
306306
// MISSINGARG_TRAILING-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: foo[#Foo#]; name=foo
307-
// MISSINGARG_TRAILING-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Foo#})[#(into: inout Hasher) -> Void#]; name=hash(self: Foo)
307+
// MISSINGARG_TRAILING-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Foo#})[#(into: inout Hasher) -> Void#]; name=hash(:)
308308
// MISSINGARG_TRAILING-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: bar[#Bar#]; name=bar
309-
// MISSINGARG_TRAILING-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bar#})[#(into: inout Hasher) -> Void#]; name=hash(self: Bar)
309+
// MISSINGARG_TRAILING-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bar#})[#(into: inout Hasher) -> Void#]; name=hash(:)
310310
// MISSINGARG_TRAILING-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: bop[#Bop#]; name=bop
311-
// MISSINGARG_TRAILING-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bop#})[#(into: inout Hasher) -> Void#]; name=hash(self: Bop)
311+
// MISSINGARG_TRAILING-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bop#})[#(into: inout Hasher) -> Void#]; name=hash(:)
312312
// MISSINGARG_TRAILING-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: bix[#Bix#]; name=bix
313-
// MISSINGARG_TRAILING-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bix#})[#(into: inout Hasher) -> Void#]; name=hash(self: Bix)
313+
// MISSINGARG_TRAILING-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Bix#})[#(into: inout Hasher) -> Void#]; name=hash(:)
314314
// MISSINGARG_TRAILING-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: boy[#Boy#]; name=boy
315-
// MISSINGARG_TRAILING-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Boy#})[#(into: inout Hasher) -> Void#]; name=hash(self: Boy)
315+
// MISSINGARG_TRAILING-DAG: Decl[InstanceMethod]/CurrNominal: hash({#(self): Boy#})[#(into: inout Hasher) -> Void#]; name=hash(:)
316316
// MISSINGARG_TRAILING: End completions
317317
}
318318

test/IDE/complete_annotation.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ func testArchetypeAnnotations<T>(arg: TestArchetypeAnnotations<T>) {
125125
}
126126
// GENERIC: Begin completions, 3 items
127127
// GENERIC-DAG: Keyword[self]/CurrNominal: <keyword>self</keyword>; typename=<typeid.user>TestArchetypeAnnotations</typeid.user>&lt;<typeid.user>T</typeid.user>&gt;; name=self
128-
// GENERIC-DAG: Decl[InstanceMethod]/CurrNominal: <name>foo1</name>(<callarg><callarg.label>u</callarg.label>: <callarg.type><typeid.user>U</typeid.user></callarg.type></callarg>, <callarg><callarg.label>t</callarg.label>: <callarg.type><typeid.user>T</typeid.user></callarg.type></callarg>); typename=<typeid.sys>Void</typeid.sys>; name=foo1(u: U, t: T)
129-
// GENERIC-DAG: Decl[InstanceMethod]/CurrNominal: <name>foo2</name>(<callarg><callarg.label>s</callarg.label>: <callarg.type><typeid.sys>Sequence</typeid.sys></callarg.type></callarg>, <callarg><callarg.label>elt</callarg.label>: <callarg.type><typeid.sys>Sequence</typeid.sys>.<typeid.sys>Element</typeid.sys></callarg.type></callarg>); typename=<typeid.sys>Void</typeid.sys>; name=foo2(s: Sequence, elt: Sequence.Element)
128+
// GENERIC-DAG: Decl[InstanceMethod]/CurrNominal: <name>foo1</name>(<callarg><callarg.label>u</callarg.label>: <callarg.type><typeid.user>U</typeid.user></callarg.type></callarg>, <callarg><callarg.label>t</callarg.label>: <callarg.type><typeid.user>T</typeid.user></callarg.type></callarg>); typename=<typeid.sys>Void</typeid.sys>; name=foo1(u:t:)
129+
// GENERIC-DAG: Decl[InstanceMethod]/CurrNominal: <name>foo2</name>(<callarg><callarg.label>s</callarg.label>: <callarg.type><typeid.sys>Sequence</typeid.sys></callarg.type></callarg>, <callarg><callarg.label>elt</callarg.label>: <callarg.type><typeid.sys>Sequence</typeid.sys>.<typeid.sys>Element</typeid.sys></callarg.type></callarg>); typename=<typeid.sys>Void</typeid.sys>; name=foo2(s:elt:)
130130
// GENERIC: End completions
131131

132132
struct TestGenericParamAnnotations<T> {

test/IDE/complete_assignment.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func f2() {
130130
// ASSIGN_5: Begin completions, 3 items
131131
// ASSIGN_5-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: case2[#D1#]; name=case2
132132
// ASSIGN_5-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: case1[#D1#]; name=case1
133-
// ASSIGN_5-DAG: Decl[InstanceMethod]/CurrNominal/TypeRelation[Invalid]: hash({#(self): D1#})[#(into: inout Hasher) -> Void#]; name=hash(self: D1)
133+
// ASSIGN_5-DAG: Decl[InstanceMethod]/CurrNominal/TypeRelation[Invalid]: hash({#(self): D1#})[#(into: inout Hasher) -> Void#]; name=hash(:)
134134

135135
func f6() {
136136
var d : D2
@@ -139,7 +139,7 @@ func f2() {
139139
// ASSIGN_6: Begin completions, 3 items
140140
// ASSIGN_6-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: case3[#D2#]; name=case3
141141
// ASSIGN_6-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Identical]: case4[#D2#]; name=case4
142-
// ASSIGN_6-DAG: Decl[InstanceMethod]/CurrNominal/TypeRelation[Invalid]: hash({#(self): D2#})[#(into: inout Hasher) -> Void#]; name=hash(self: D2)
142+
// ASSIGN_6-DAG: Decl[InstanceMethod]/CurrNominal/TypeRelation[Invalid]: hash({#(self): D2#})[#(into: inout Hasher) -> Void#]; name=hash(:)
143143

144144
func f7 (C : C2) {
145145
var i : Int

test/IDE/complete_asyncannotation.swift

+14-14
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,55 @@ struct HasAsyncMembers {
1919
func testGlobalFuncAsync() async {
2020
globalFuncAsync#^CHECK_globalFuncAsync^#
2121
// CHECK_globalFuncAsync: Begin completions
22-
// CHECK_globalFuncAsync-DAG: Decl[FreeFunction]/CurrModule/Flair[ArgLabels]: ()[' async'][#Void#]; name=() async
22+
// CHECK_globalFuncAsync-DAG: Decl[FreeFunction]/CurrModule/Flair[ArgLabels]: ()[' async'][#Void#]; name=(){{$}}
2323
// CHECK_globalFuncAsync: End completions
2424
}
2525
func testGlobalFuncAsyncThrows() async {
2626
globalFuncAsyncThrows#^CHECK_globalFuncAsyncThrows^#
2727
// CHECK_globalFuncAsyncThrows: Begin completions
28-
// CHECK_globalFuncAsyncThrows-DAG: Decl[FreeFunction]/CurrModule/Flair[ArgLabels]: ()[' async'][' throws'][#Void#]; name=() async throws
28+
// CHECK_globalFuncAsyncThrows-DAG: Decl[FreeFunction]/CurrModule/Flair[ArgLabels]: ()[' async'][' throws'][#Void#]; name=(){{$}}
2929
// CHECK_globalFuncAsyncThrows: End completions
3030
}
3131
func testGlobalFuncAsyncRethrows() async {
3232
globalFuncAsyncRethrows#^CHECK_globalFuncAsyncRethrows^#
3333
// CHECK_globalFuncAsyncRethrows: Begin completions
34-
// CHECK_globalFuncAsyncRethrows-DAG: Decl[FreeFunction]/CurrModule/Flair[ArgLabels]: ({#(x): () async throws -> ()##() async throws -> ()#})[' async'][' rethrows'][#Void#]; name=(x: () async throws -> ()) async rethrows
34+
// CHECK_globalFuncAsyncRethrows-DAG: Decl[FreeFunction]/CurrModule/Flair[ArgLabels]: ({#(x): () async throws -> ()##() async throws -> ()#})[' async'][' rethrows'][#Void#]; name=(:){{$}}
3535
// CHECK_globalFuncAsyncRethrows: End completions
3636
}
3737
func testAsyncMembers(_ x: HasAsyncMembers) async {
3838
x.#^CHECK_members^#
3939
// CHECK_members: Begin completions
40-
// CHECK_members-DAG: Decl[InstanceMethod]/CurrNominal: memberAsync()[' async'][#Void#]; name=memberAsync() async
41-
// CHECK_members-DAG: Decl[InstanceMethod]/CurrNominal: memberAsyncThrows()[' async'][' throws'][#Void#]; name=memberAsyncThrows() async throws
42-
// CHECK_members-DAG: Decl[InstanceMethod]/CurrNominal: memberAsyncRethrows {|}[' async'][' rethrows'][#Void#]; name=memberAsyncRethrows { code } async rethrows
43-
// CHECK_members-DAG: Decl[InstanceMethod]/CurrNominal: memberAsyncRethrows({#(x): () async throws -> ()##() async throws -> ()#})[' async'][' rethrows'][#Void#]; name=memberAsyncRethrows(x: () async throws -> ()) async rethrows
40+
// CHECK_members-DAG: Decl[InstanceMethod]/CurrNominal: memberAsync()[' async'][#Void#]; name=memberAsync(){{$}}
41+
// CHECK_members-DAG: Decl[InstanceMethod]/CurrNominal: memberAsyncThrows()[' async'][' throws'][#Void#]; name=memberAsyncThrows(){{$}}
42+
// CHECK_members-DAG: Decl[InstanceMethod]/CurrNominal: memberAsyncRethrows {|}[' async'][' rethrows'][#Void#]; name=memberAsyncRethrows{{$}}
43+
// CHECK_members-DAG: Decl[InstanceMethod]/CurrNominal: memberAsyncRethrows({#(x): () async throws -> ()##() async throws -> ()#})[' async'][' rethrows'][#Void#]; name=memberAsyncRethrows(:){{$}}
4444
// CHECK_members: End completions
4545
}
4646
func testMemberAsync(_ x: HasAsyncMembers) async {
4747
x.memberAsync#^CHECK_memberAsync^#
4848
// CHECK_memberAsync: Begin completions
49-
// CHECK_memberAsync-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ()[' async'][#Void#]; name=() async
49+
// CHECK_memberAsync-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ()[' async'][#Void#]; name=(){{$}}
5050
// CHECK_memberAsync: End completions
5151
}
5252
func testMemberAsyncThrows(_ x: HasAsyncMembers) async {
5353
x.memberAsyncThrows#^CHECK_memberAsyncThrows^#
5454
// CHECK_memberAsyncThrows: Begin completions
55-
// CHECK_memberAsyncThrows-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ()[' async'][' throws'][#Void#]; name=() async throws
55+
// CHECK_memberAsyncThrows-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ()[' async'][' throws'][#Void#]; name=(){{$}}
5656
// CHECK_memberAsyncThrows: End completions
5757
}
5858
func testMemberAsyncRethrows(_ x: HasAsyncMembers) async {
5959
x.memberAsyncRethrows#^CHECK_memberAsyncRethrows^#
6060
// CHECK_memberAsyncRethrows: Begin completions
61-
// CHECK_memberAsyncRethrows-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ({#(x): () async throws -> ()##() async throws -> ()#})[' async'][' rethrows'][#Void#]; name=(x: () async throws -> ()) async rethrows
61+
// CHECK_memberAsyncRethrows-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ({#(x): () async throws -> ()##() async throws -> ()#})[' async'][' rethrows'][#Void#]; name=(:){{$}}
6262
// CHECK_memberAsyncRethrows: End completions
6363
}
6464

6565
func testAsyncIntiializers() async {
6666
HasAsyncMembers(#^CHECK_initializers^#
6767
// CHECK_initializers: Begin completions
68-
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['('][')'][' async'][#HasAsyncMembers#]; name= async
69-
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#withAsync: Int#}[')'][' async'][#HasAsyncMembers#]; name=withAsync: Int async
70-
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#withAsyncThrows: Int#}[')'][' async'][' throws'][#HasAsyncMembers#]; name=withAsyncThrows: Int async throws
71-
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#withAsyncRethrows: () async throws -> Void##() async throws -> Void#}[')'][' async'][' rethrows'][#HasAsyncMembers#]; name=withAsyncRethrows: () async throws -> Void async rethrows
68+
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['('][')'][' async'][#HasAsyncMembers#]; name={{$}}
69+
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#withAsync: Int#}[')'][' async'][#HasAsyncMembers#]; name=withAsync:{{$}}
70+
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#withAsyncThrows: Int#}[')'][' async'][' throws'][#HasAsyncMembers#]; name=withAsyncThrows:{{$}}
71+
// CHECK_initializers-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#withAsyncRethrows: () async throws -> Void##() async throws -> Void#}[')'][' async'][' rethrows'][#HasAsyncMembers#]; name=withAsyncRethrows:{{$}}
7272
// CHECK_initializers: End completions
7373
}

0 commit comments

Comments
 (0)