[cfe-commits] r148707 - /cfe/trunk/tools/libclang/IndexTypeSourceInfo.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Mon Jan 23 08:58:41 PST 2012


Author: akirtzidis
Date: Mon Jan 23 10:58:41 2012
New Revision: 148707

URL: http://llvm.org/viewvc/llvm-project?rev=148707&view=rev
Log:
[libclang] Index C++ template specializations, rdar://10732708

Modified:
    cfe/trunk/tools/libclang/IndexTypeSourceInfo.cpp

Modified: cfe/trunk/tools/libclang/IndexTypeSourceInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/IndexTypeSourceInfo.cpp?rev=148707&r1=148706&r2=148707&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/IndexTypeSourceInfo.cpp (original)
+++ cfe/trunk/tools/libclang/IndexTypeSourceInfo.cpp Mon Jan 23 10:58:41 2012
@@ -70,6 +70,14 @@
     }
     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





More information about the cfe-commits mailing list