diff options
| author | Daniel Jasper <djasper@google.com> | 2017-05-03 11:27:34 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2017-05-03 11:27:34 +0000 |
| commit | b2bf741e9aa1dc843d47d9b29c34fd3eb7cdab4a (patch) | |
| tree | 5148187c1392a3fc92b69516302b63e450b5cb52 | |
| parent | c748d7b57b2e383df1dc4ca088a1d6ea49ab1a55 (diff) | |
| download | bcm5719-llvm-b2bf741e9aa1dc843d47d9b29c34fd3eb7cdab4a.tar.gz bcm5719-llvm-b2bf741e9aa1dc843d47d9b29c34fd3eb7cdab4a.zip | |
Undo turning ExtBehavior into a bitfield.
This produces warnings that I can't explain in a GCC build:
In file included from ../tools/clang/include/clang/Lex/LexDiagnostic.h:13:0,
from /usr/local/google/home/djasper/llvm/tools/clang/lib/Lex/PTHLexer.cpp:19:
../tools/clang/include/clang/Basic/Diagnostic.h:219:34: warning: ‘clang::DiagnosticsEngine::DiagState::ExtBehavior’ is too small to hold all values of ‘enum class clang::diag::Severity’ [enabled by default]
diag::Severity ExtBehavior : 4; // Map extensions to warnings or errors?
^
While I don't think this warning makes sense, I'd like to get this back to being
warning-free. This only seems to trigger for "enum class".
Reproducer:
https://godbolt.org/g/P2ekVd
llvm-svn: 302012
| -rw-r--r-- | clang/include/clang/Basic/Diagnostic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h index 610273015ca..22cded21c12 100644 --- a/clang/include/clang/Basic/Diagnostic.h +++ b/clang/include/clang/Basic/Diagnostic.h @@ -216,7 +216,7 @@ private: unsigned WarningsAsErrors : 1; // Treat warnings like errors. unsigned ErrorsAsFatal : 1; // Treat errors like fatal errors. unsigned SuppressSystemWarnings : 1; // Suppress warnings in system headers. - diag::Severity ExtBehavior : 4; // Map extensions to warnings or errors? + diag::Severity ExtBehavior; // Map extensions to warnings or errors? DiagState() : IgnoreAllWarnings(false), EnableAllWarnings(false), |

