summaryrefslogtreecommitdiffstats
path: root/tools/libclang/CIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r--tools/libclang/CIndex.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index c89393a476..310374c46b 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -3411,6 +3411,9 @@ clang_parseTranslationUnit_Impl(CXIndex CIdx, const char *source_filename,
if (options & CXTranslationUnit_KeepGoing)
Diags->setSuppressAfterFatalError(false);
+ if (options & CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles)
+ Diags->setSuppressNonErrorsFromIncludedFiles(true);
+
// Recover resources if we crash before exiting this function.
llvm::CrashRecoveryContextCleanupRegistrar<DiagnosticsEngine,
llvm::CrashRecoveryContextReleaseRefCleanup<DiagnosticsEngine> >