diff options
Diffstat (limited to 'clang/tools/libclang/Indexing.cpp')
-rw-r--r-- | clang/tools/libclang/Indexing.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index c42ef2308a7..a70a3415431 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/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; } }; |