File tree 3 files changed +16
-2
lines changed
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ void Symbol::serializeNames(llvm::json::OStream &OS) const {
120
120
SmallVector<PathComponent, 8 > PathComponents;
121
121
getPathComponents (PathComponents);
122
122
123
- if (isa<GenericTypeDecl>(VD)) {
123
+ if (isa<GenericTypeDecl>(VD) || isa<EnumElementDecl>(VD)) {
124
124
SmallString<64 > FullyQualifiedTitle;
125
125
126
126
for (const auto *It = PathComponents.begin (); It != PathComponents.end (); ++It) {
Original file line number Diff line number Diff line change @@ -745,7 +745,7 @@ enum MyEnum {
745
745
// CHECKCASE: "spelling": "someCase"
746
746
// CHECKCASE: }
747
747
// CHECKCASE: ],
748
- // CHECKCASE: "title": "someCase"
748
+ // CHECKCASE: "title": "MyEnum. someCase"
749
749
// CHECKCASE: },
750
750
// CHECKCASE: "pathComponents": [
751
751
// CHECKCASE: "MyEnum",
Original file line number Diff line number Diff line change 5
5
// RUN: %FileCheck %s --input-file %t/Names.symbols.json --check-prefix=FUNC
6
6
// RUN: %FileCheck %s --input-file %t/Names.symbols.json --check-prefix=INNERTYPE
7
7
// RUN: %FileCheck %s --input-file %t/Names.symbols.json --check-prefix=INNERTYPEALIAS
8
+ // RUN: %FileCheck %s --input-file %t/Names.symbols.json --check-prefix=INNERENUM
9
+ // RUN: %FileCheck %s --input-file %t/Names.symbols.json --check-prefix=INNERCASE
8
10
9
11
public struct MyStruct {
10
12
public struct InnerStruct { }
11
13
12
14
public typealias InnerTypeAlias = InnerStruct
13
15
14
16
public func foo( ) { }
17
+
18
+ public enum InnerEnum {
19
+ case InnerCase
20
+ }
15
21
}
16
22
17
23
// CHECK-LABEL: "precise": "s:5Names8MyStructV"
@@ -29,3 +35,11 @@ public struct MyStruct {
29
35
// INNERTYPEALIAS-LABEL: "precise": "s:5Names8MyStructV14InnerTypeAliasa"
30
36
// INNERTYPEALIAS: names
31
37
// INNERTYPEALIAS-NEXT: "title": "MyStruct.InnerTypeAlias"
38
+
39
+ // INNERENUM-LABEL: "precise": "s:5Names8MyStructV9InnerEnumO",
40
+ // INNERENUM: names
41
+ // INNERENUM-NEXT: "title": "MyStruct.InnerEnum"
42
+
43
+ // INNERCASE-LABEL: "precise": "s:5Names8MyStructV9InnerEnumO0D4CaseyA2EmF",
44
+ // INNERCASE: names
45
+ // INNERCASE-NEXT: "title": "MyStruct.InnerEnum.InnerCase",
You can’t perform that action at this time.
0 commit comments