diff options
| author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2019-02-20 17:13:14 +0100 |
|---|---|---|
| committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2019-03-07 12:56:01 +0000 |
| commit | dba0adcfe0fec308a047cca79b1be0b1436f6fad (patch) | |
| tree | cd086e0eba2b36b88d2146e4a90ceab61a52f4f3 /include | |
| parent | d1408d8177f7553097d1efd9d62c75868340266b (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 <ivan.donchevskii@qt.io>
Diffstat (limited to 'include')
| -rw-r--r-- | include/clang/Basic/Diagnostic.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h index 89ccb3e0e2..255e921920 100644 --- a/include/clang/Basic/Diagnostic.h +++ b/include/clang/Basic/Diagnostic.h @@ -207,8 +207,8 @@ private: // Used by __extension__ unsigned char AllExtensionsSilenced = 0; - // Suppress diagnostics after a fatal error? - bool SuppressAfterFatalError = true; + // Treat fatal errors like errors. + bool FatalsAsError = false; // Suppress all diagnostics. bool SuppressAllDiagnostics = false; @@ -617,9 +617,11 @@ public: void setErrorsAsFatal(bool Val) { GetCurDiagState()->ErrorsAsFatal = Val; } bool getErrorsAsFatal() const { return GetCurDiagState()->ErrorsAsFatal; } - /// When set to true (the default), suppress further diagnostics after - /// a fatal error. - void setSuppressAfterFatalError(bool Val) { SuppressAfterFatalError = Val; } + /// \brief When set to true, any fatal error reported is made an error. + /// + /// This setting takes precedence over the setErrorsAsFatal setting above. + void setFatalsAsError(bool Val) { FatalsAsError = Val; } + bool getFatalsAsError() const { return FatalsAsError; } /// When set to true mask warnings that come from system headers. void setSuppressSystemWarnings(bool Val) { |
