From f484b139dbc7a0e303657da51585d29ca2c9a007 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Wed, 3 Oct 2012 21:05:51 +0000 Subject: [libclang] When indexing, invoke the importedASTFile for PCH files as well. llvm-svn: 165161 --- clang/tools/libclang/IndexingContext.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'clang/tools/libclang/IndexingContext.cpp') diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp index c964e963c73..1186191cc37 100644 --- a/clang/tools/libclang/IndexingContext.cpp +++ b/clang/tools/libclang/IndexingContext.cpp @@ -273,6 +273,21 @@ void IndexingContext::importedModule(const ImportDecl *ImportD) { (void)astFile; } +void IndexingContext::importedPCH(const FileEntry *File) { + if (!CB.importedASTFile) + return; + + CXIdxImportedASTFileInfo Info = { + (CXFile)File, + getIndexLoc(SourceLocation()), + /*isModule=*/false, + /*isImplicit=*/false, + /*moduleName=*/NULL + }; + CXIdxClientASTFile astFile = CB.importedASTFile(ClientData, &Info); + (void)astFile; +} + void IndexingContext::startedTranslationUnit() { CXIdxClientContainer idxCont = 0; if (CB.startedTranslationUnit) -- cgit v1.2.3