]> granicus.if.org Git - clang/commitdiff
[libclang] Index C++ template specializations, rdar://10732708
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 23 Jan 2012 16:58:41 +0000 (16:58 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 23 Jan 2012 16:58:41 +0000 (16:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148707 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/IndexTypeSourceInfo.cpp

index 1b2069d30d3c9cd7d8ba30d52173e1febb194d0a..e326404842393b697d9f3603fea9be1f02c1a699 100644 (file)
@@ -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