diff options
| author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2019-03-07 10:13:50 +0000 |
|---|---|---|
| committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2019-03-07 10:13:50 +0000 |
| commit | 878271b2945e89b868fb8daefea3dfaffce32710 (patch) | |
| tree | f0f94102c32dede3e59498b4ed18d9db3d8fa1eb /clang/tools | |
| parent | fd4156ed4d30828fbcca7b42618dde0550c9b674 (diff) | |
| download | bcm5719-llvm-878271b2945e89b868fb8daefea3dfaffce32710.tar.gz bcm5719-llvm-878271b2945e89b868fb8daefea3dfaffce32710.zip | |
[libclang] Fix CXTranslationUnit_KeepGoing
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.
Patch by Nikolai Kosjar.
Differential Revision: https://reviews.llvm.org/D58501
llvm-svn: 355586
Diffstat (limited to 'clang/tools')
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index cdcdfc167b2..07e052bf0c1 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -3408,7 +3408,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); // Recover resources if we crash before exiting this function. llvm::CrashRecoveryContextCleanupRegistrar<DiagnosticsEngine, |

