File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 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 {
120120 SmallVector<PathComponent, 8 > PathComponents;
121121 getPathComponents (PathComponents);
122122
123- if (isa<GenericTypeDecl>(VD)) {
123+ if (isa<GenericTypeDecl>(VD) || isa<EnumElementDecl>(VD)) {
124124 SmallString<64 > FullyQualifiedTitle;
125125
126126 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 {
745745// CHECKCASE: "spelling": "someCase"
746746// CHECKCASE: }
747747// CHECKCASE: ],
748- // CHECKCASE: "title": "someCase"
748+ // CHECKCASE: "title": "MyEnum. someCase"
749749// CHECKCASE: },
750750// CHECKCASE: "pathComponents": [
751751// CHECKCASE: "MyEnum",
Original file line number Diff line number Diff line change 55// RUN: %FileCheck %s --input-file %t/Names.symbols.json --check-prefix=FUNC
66// RUN: %FileCheck %s --input-file %t/Names.symbols.json --check-prefix=INNERTYPE
77// 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
810
911public struct MyStruct {
1012 public struct InnerStruct { }
1113
1214 public typealias InnerTypeAlias = InnerStruct
1315
1416 public func foo( ) { }
17+
18+ public enum InnerEnum {
19+ case InnerCase
20+ }
1521}
1622
1723// CHECK-LABEL: "precise": "s:5Names8MyStructV"
@@ -29,3 +35,11 @@ public struct MyStruct {
2935// INNERTYPEALIAS-LABEL: "precise": "s:5Names8MyStructV14InnerTypeAliasa"
3036// INNERTYPEALIAS: names
3137// 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