r302012 - Undo turning ExtBehavior into a bitfield.
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Wed May 3 04:27:37 PDT 2017
Author: djasper
Date: Wed May 3 06:27:34 2017
New Revision: 302012
URL: http://llvm.org/viewvc/llvm-project?rev=302012&view=rev
Log:
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
Modified:
cfe/trunk/include/clang/Basic/Diagnostic.h
Modified: cfe/trunk/include/clang/Basic/Diagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=302012&r1=302011&r2=302012&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Wed May 3 06:27:34 2017
@@ -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),
More information about the cfe-commits
mailing list