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:
Richard Smith 2018-06-29 20:41:23 +00:00
parent 833ad29a88
commit dd5dcddd41
1 changed files with 1 additions and 1 deletions

View File

@ -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