From: Argyrios Kyrtzidis Date: Mon, 23 Jan 2012 16:58:41 +0000 (+0000) Subject: [libclang] Index C++ template specializations, rdar://10732708 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=145f7b2093a0050621141acd089e09edf6118a09;p=clang [libclang] Index C++ template specializations, rdar://10732708 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148707 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/libclang/IndexTypeSourceInfo.cpp b/tools/libclang/IndexTypeSourceInfo.cpp index 1b2069d30d..e326404842 100644 --- a/tools/libclang/IndexTypeSourceInfo.cpp +++ b/tools/libclang/IndexTypeSourceInfo.cpp @@ -70,6 +70,14 @@ public: } return true; } + + bool VisitTemplateSpecializationTypeLoc(TemplateSpecializationTypeLoc TL) { + if (const TemplateSpecializationType *T = TL.getTypePtr()) + if (const TemplateDecl *D = T->getTemplateName().getAsTemplateDecl()) + IndexCtx.handleReference(D, TL.getTemplateNameLoc(), + Parent, ParentDC); + return true; + } }; } // anonymous namespace