summaryrefslogtreecommitdiffstats
path: root/tools/libclang/CIndex.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <[email protected]>2019-02-20 17:13:14 +0100
committerIvan Donchevskii <[email protected]>2019-03-07 12:56:01 +0000
commitdba0adcfe0fec308a047cca79b1be0b1436f6fad (patch)
treecd086e0eba2b36b88d2146e4a90ceab61a52f4f3 /tools/libclang/CIndex.cpp
parentd1408d8177f7553097d1efd9d62c75868340266b (diff)
[backported/clang-9][libclang] Fix CXTranslationUnit_KeepGoingrelease_70-based
-------------------------------------------------------------------------- https://reviews.llvm.org/D58501 -------------------------------------------------------------------------- Since commit 56f548bbbb7e4387a69708f70724d00e9e076153 [modules] Round-trip -Werror flag through explicit module build. the behavior of CXTranslationUnit_KeepGoing changed: Unresolved #includes are fatal errors again. As a consequence, some templates are not instantiated and lead to confusing errors. Revert to the old behavior: With CXTranslationUnit_KeepGoing fatal errors are mapped to errors. Subscribers: arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58501 Fixes: QTCREATORBUG-21892 Change-Id: I6b5c2490922a798fcc9080fa73fa1fdaecf7bddd Reviewed-by: Ivan Donchevskii <[email protected]>
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r--tools/libclang/CIndex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 4b508ad22f..33c074632f 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -3397,7 +3397,7 @@ clang_parseTranslationUnit_Impl(CXIndex CIdx, const char *source_filename,
Diags(CompilerInstance::createDiagnostics(new DiagnosticOptions));
if (options & CXTranslationUnit_KeepGoing)
- Diags->setSuppressAfterFatalError(false);
+ Diags->setFatalsAsError(true);
if (options & CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles)
Diags->setSuppressNonErrorsFromIncludedFiles(true);