File tree Expand file tree Collapse file tree 3 files changed +39
-4
lines changed Expand file tree Collapse file tree 3 files changed +39
-4
lines changed Original file line number Diff line number Diff line change @@ -735,7 +735,7 @@ void TuIndexer::saveTagDecl(const clang::TagDecl &tagDecl) {
735
735
continue ;
736
736
}
737
737
if (seen.find (cxxRecordDecl) == seen.end ()) {
738
- // See FIXME(ref : template-specialization-support) When we get the decl
738
+ // FIXME(def : template-specialization-support) When we get the decl
739
739
// symbol here, we need to handle different kinds of templates
740
740
// differently. E.g. in the ImplicitInstantiation case, call
741
741
// getTemplateInstantiationPattern and use that rather than using the
@@ -750,7 +750,12 @@ void TuIndexer::saveTagDecl(const clang::TagDecl &tagDecl) {
750
750
}
751
751
seen.insert (cxxRecordDecl);
752
752
}
753
-
753
+ if (!cxxRecordDecl->hasDefinition ()) {
754
+ // FIXME(def: template-specialization-support) This case
755
+ // can be hit when inheriting from an explicit specialization
756
+ // for which the unspecialized record lacks a definition.
757
+ continue ;
758
+ }
754
759
for (const clang::CXXBaseSpecifier &cxxBaseSpecifier :
755
760
cxxRecordDecl->bases ()) {
756
761
auto baseType = cxxBaseSpecifier.getType ().getCanonicalType ();
Original file line number Diff line number Diff line change
1
+ // extra-args: -std=c++17
2
+
1
3
struct MonoBase {};
2
4
3
5
struct MonoDerived : MonoBase {};
@@ -35,4 +37,12 @@ template <typename T>
35
37
struct DerivedFromTemplateParam : T {};
36
38
37
39
template <template <typename > typename H>
38
- struct DerivedFromTemplateTemplateParam : H<int > {};
40
+ struct DerivedFromTemplateTemplateParam : H<int > {};
41
+
42
+ template <bool , class T > struct BaseWithOnlySpecializations ;
43
+
44
+ template <class T >
45
+ struct BaseWithOnlySpecializations <false , T> {};
46
+
47
+ template <class T >
48
+ struct DerivedFromBasedWithOnlySpecialization : public BaseWithOnlySpecializations <false , T> {};
Original file line number Diff line number Diff line change
1
+ // extra-args: -std=c++17
2
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^ definition [..] `<file>/inheritance.cc`/
3
+
1
4
struct MonoBase {};
2
- // ^^^^^^ definition [..] `<file>/inheritance.cc`/
3
5
// ^^^^^^^^ definition [..] MonoBase#
4
6
5
7
struct MonoDerived : MonoBase {};
87
89
struct DerivedFromTemplateTemplateParam : H<int > {};
88
90
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition [..] DerivedFromTemplateTemplateParam#
89
91
// ^ reference local 7
92
+
93
+ template <bool , class T > struct BaseWithOnlySpecializations ;
94
+ // ^ definition local 8
95
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^ reference [..] BaseWithOnlySpecializations#
96
+
97
+ template <class T >
98
+ // ^ definition local 9
99
+ struct BaseWithOnlySpecializations <false , T> {};
100
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition [..] BaseWithOnlySpecializations#
101
+ // ^ reference local 9
102
+
103
+ template <class T >
104
+ // ^ definition local 10
105
+ struct DerivedFromBasedWithOnlySpecialization : public BaseWithOnlySpecializations <false , T> {};
106
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition [..] DerivedFromBasedWithOnlySpecialization#
107
+ // relation implementation [..] BaseWithOnlySpecializations#
108
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^ reference [..] BaseWithOnlySpecializations#
109
+ // ^ reference local 10
You can’t perform that action at this time.
0 commit comments