mirror of https://github.com/microsoft/clang.git
Specify an explicit underlying type for this enum to fix Windows
buildbots. On Windows targets, enums always get an underlying type of 'int', even if they have wider enumerators. (This is non-conforming, but it's effectively part of the target ABI.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336013 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
833ad29a88
commit
dd5dcddd41
|
@ -8,7 +8,7 @@ static_assert(sizeof(+X().e) == sizeof(int), "");
|
|||
static_assert(sizeof(X().e + 1) == sizeof(int), "");
|
||||
static_assert(sizeof(true ? X().e : 0) == sizeof(int), "");
|
||||
|
||||
enum E { a = __LONG_LONG_MAX__ };
|
||||
enum E : long long { a = __LONG_LONG_MAX__ };
|
||||
static_assert(sizeof(E{}) == sizeof(long long), "");
|
||||
|
||||
// If the bit-field has an enumerated type, it is treated as any other value of
|
||||
|
|
Loading…
Reference in New Issue