aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/Indexing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libclang/Indexing.cpp')
-rw-r--r--tools/libclang/Indexing.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp
index af9fad8ced..5af1d50e72 100644
--- a/tools/libclang/Indexing.cpp
+++ b/tools/libclang/Indexing.cpp
@@ -317,7 +317,8 @@ static void clang_indexSourceFile_Impl(void *UserData) {
if (!requestedToGetTU)
CInvok->getPreprocessorOpts().DetailedRecord = false;
- ASTUnit *Unit = ASTUnit::create(CInvok.getPtr(), Diags);
+ ASTUnit *Unit = ASTUnit::create(CInvok.getPtr(), Diags,
+ /*CaptureDiagnostics=*/true);
llvm::OwningPtr<CXTUOwner> CXTU(new CXTUOwner(MakeCXTranslationUnit(Unit)));
// Recover resources if we crash before exiting this method.