Fix bitfield enums to not trigger upcoming Clang warning
Fix bitfield enums to not trigger upcoming Clang warning regarding non-unsigned enum bitfields producing non-portable code. For more details, see the patch here: https://reviews.llvm.org/D24289 BUG=648462 Review-Url: https://codereview.chromium.org/2349153002 Cr-Commit-Position: refs/heads/master@{#39649}
This commit is contained in:
parent
1ca44a0a28
commit
a81e00d533
@ -90,7 +90,7 @@ struct StaticDstRangeRelationToSrcRange<Dst,
|
||||
static const NumericRangeRepresentation value = NUMERIC_RANGE_NOT_CONTAINED;
|
||||
};
|
||||
|
||||
enum RangeConstraint {
|
||||
enum RangeConstraint : unsigned char {
|
||||
RANGE_VALID = 0x0, // Value can be represented by the destination type.
|
||||
RANGE_UNDERFLOW = 0x1, // Value would overflow.
|
||||
RANGE_OVERFLOW = 0x2, // Value would underflow.
|
||||
|
@ -1058,8 +1058,7 @@ enum InitializationFlag : uint8_t { kNeedsInitialization, kCreatedInitialized };
|
||||
enum MaybeAssignedFlag : uint8_t { kNotAssigned, kMaybeAssigned };
|
||||
|
||||
// Serialized in PreparseData, so numeric values should not be changed.
|
||||
enum ParseErrorType { kSyntaxError = 0, kReferenceError = 1 };
|
||||
|
||||
enum ParseErrorType : uint8_t { kSyntaxError = 0, kReferenceError = 1 };
|
||||
|
||||
enum MinusZeroMode {
|
||||
TREAT_MINUS_ZERO_AS_ZERO,
|
||||
|
@ -649,7 +649,7 @@ class ErrorUtils : public AllStatic {
|
||||
|
||||
class MessageTemplate {
|
||||
public:
|
||||
enum Template {
|
||||
enum Template : unsigned {
|
||||
#define TEMPLATE(NAME, STRING) k##NAME,
|
||||
MESSAGE_TEMPLATES(TEMPLATE)
|
||||
#undef TEMPLATE
|
||||
|
Loading…
Reference in New Issue
Block a user