aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/Indexing.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-10 20:10:44 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-10 20:10:44 +0000
commit6d968363877388f0a0268711d59367907b465ae1 (patch)
treed9ccc4a529a9a2624f3d6764fce67a2aaf3db802 /tools/libclang/Indexing.cpp
parent409e2456b70588eff1ef5477843fcd56454d8855 (diff)
[libclang] Indexing API: Fully index implict template instantiations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/Indexing.cpp')
-rw-r--r--tools/libclang/Indexing.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp
index c42ef2308a..a70a341543 100644
--- a/tools/libclang/Indexing.cpp
+++ b/tools/libclang/Indexing.cpp
@@ -135,6 +135,15 @@ public:
/// The default implementation forwards to HandleTopLevelDecl but we don't
/// care about them when indexing, so have an empty definition.
virtual void HandleInterestingDecl(DeclGroupRef D) {}
+
+ virtual void HandleTagDeclDefinition(TagDecl *D) {
+ if (IndexCtx.isTemplateImplicitInstantiation(D))
+ IndexCtx.indexDecl(D);
+ }
+
+ virtual void HandleCXXImplicitFunctionInstantiation(FunctionDecl *D) {
+ IndexCtx.indexDecl(D);
+ }
};
//===----------------------------------------------------------------------===//
@@ -185,7 +194,7 @@ public:
indexDiagnostics(CXTU, IndexCtx);
}
- virtual TranslationUnitKind getTranslationUnitKind() { return TU_Prefix; }
+ virtual TranslationUnitKind getTranslationUnitKind() { return TU_Complete; }
virtual bool hasCodeCompletionSupport() const { return false; }
};