From: Eric Fiselier Date: Thu, 22 Mar 2018 21:17:07 +0000 (+0000) Subject: Fix test failure on Windows caused by different underlying enumeration type rules X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f11cb2c3ad06f627201863b5b98fe488a5fb3c2;p=clang Fix test failure on Windows caused by different underlying enumeration type rules git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328243 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaCXX/builtin-operator-new-delete.cpp b/test/SemaCXX/builtin-operator-new-delete.cpp index fb5e9a4857..40d47329ef 100644 --- a/test/SemaCXX/builtin-operator-new-delete.cpp +++ b/test/SemaCXX/builtin-operator-new-delete.cpp @@ -19,8 +19,12 @@ namespace std { #if __cplusplus >= 201103L enum class align_val_t : size_t {}; #else - enum align_val_t { __zero = 0, - __max = (size_t)-1 }; + enum align_val_t { + // We can't force an underlying type when targeting windows. +# ifndef _WIN32 + __zero = 0, __max = (size_t)-1 +# endif + }; #endif } std::nothrow_t nothrow;