diff options
Diffstat (limited to 'lib/Index/IndexTypeSourceInfo.cpp')
| -rw-r--r-- | lib/Index/IndexTypeSourceInfo.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Index/IndexTypeSourceInfo.cpp b/lib/Index/IndexTypeSourceInfo.cpp index ae27ebe6ea4c..c8ff3d72d4be 100644 --- a/lib/Index/IndexTypeSourceInfo.cpp +++ b/lib/Index/IndexTypeSourceInfo.cpp @@ -126,8 +126,9 @@ public: return true; } - bool VisitTemplateSpecializationTypeLoc(TemplateSpecializationTypeLoc TL) { - if (const TemplateSpecializationType *T = TL.getTypePtr()) { + template<typename TypeLocType> + bool HandleTemplateSpecializationTypeLoc(TypeLocType TL) { + if (const auto *T = TL.getTypePtr()) { if (IndexCtx.shouldIndexImplicitTemplateInsts()) { if (CXXRecordDecl *RD = T->getAsCXXRecordDecl()) IndexCtx.handleReference(RD, TL.getTemplateNameLoc(), @@ -141,6 +142,14 @@ public: return true; } + bool VisitTemplateSpecializationTypeLoc(TemplateSpecializationTypeLoc TL) { + return HandleTemplateSpecializationTypeLoc(TL); + } + + bool VisitDeducedTemplateSpecializationTypeLoc(DeducedTemplateSpecializationTypeLoc TL) { + return HandleTemplateSpecializationTypeLoc(TL); + } + bool VisitDependentNameTypeLoc(DependentNameTypeLoc TL) { const DependentNameType *DNT = TL.getTypePtr(); const NestedNameSpecifier *NNS = DNT->getQualifier(); |
