Skip to content

Commit e701d40

Browse files
committed
Final tweaks from review comments.
1 parent b913eec commit e701d40

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/Index/Index.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,8 @@ class IndexSwiftASTWalker : public SourceEntityWalker {
916916
assert(Range.getByteLength() > 1);
917917
if (Range.str().front() == '`') {
918918
assert(Range.getByteLength() > 3);
919-
assert(Range.str().consume_front("`_") ||
920-
Range.str().consume_front("`$"));
919+
assert(Range.str().starts_with("`_") ||
920+
Range.str().starts_with("`$"));
921921
auto AfterBacktick = Loc.getAdvancedLoc(2);
922922
reportRef(Wrapped, AfterBacktick, Info, std::nullopt);
923923
} else {

test/IDE/complete_raw_identifiers.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ struct `Struct With Spaces` {}
66

77
func test01() {
88
#^GLOBAL_NAME^#
9-
// GLOBAL_NAME: Decl[FreeFunction]/CurrModule: `func with spaces`()[#Void#]; name=`func with spaces`()
9+
// GLOBAL_NAME-DAG: Decl[FreeFunction]/CurrModule: `func with spaces`()[#Void#]; name=`func with spaces`()
1010
// GLOBAL_NAME-DAG: Decl[TypeAlias]/CurrModule: `Space Alias`[#`Struct With Spaces`#]; name=`Space Alias`
1111
// GLOBAL_NAME-DAG: Decl[Struct]/CurrModule: `Struct With Spaces`[#`Struct With Spaces`#]; name=`Struct With Spaces`
1212
}
@@ -19,14 +19,14 @@ struct S {
1919

2020
func test02(_ x: S) {
2121
x.#^MEMBER_NAME^#
22-
// MEMBER_NAME: Decl[InstanceVar]/CurrNominal: `name with spaces :)`[#Int#]; name=`name with spaces :)`
22+
// MEMBER_NAME-DAG: Decl[InstanceVar]/CurrNominal: `name with spaces :)`[#Int#]; name=`name with spaces :)`
2323
// MEMBER_NAME-DAG: Decl[InstanceMethod]/CurrNominal: `some.method`({#`argument label!`: Int#})[#Void#]; name=`some.method`(`argument label!`:)
2424
// MEMBER_NAME-DAG: Decl[InstanceMethod]/CurrNominal: f({#x: `Struct With Spaces`#})[#Void#]; name=f(x:)
2525
}
2626

2727
struct S2<`Generic Param`> {
2828
var x: #^TYPE_NAME^#
29-
// TYPE_NAME: Decl[GenericTypeParam]/Local: `Generic Param`[#Generic Param#]; name=`Generic Param`
29+
// TYPE_NAME-DAG: Decl[GenericTypeParam]/Local: `Generic Param`[#Generic Param#]; name=`Generic Param`
3030
// TYPE_NAME-DAG: Keyword[Self]/CurrNominal: Self[#S2<Generic Param>#]; name=Self
3131
}
3232

0 commit comments

Comments
 (0)