r328243 - Fix test failure on Windows caused by different underlying enumeration type rules

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 22 14:17:07 PDT 2018


Author: ericwf
Date: Thu Mar 22 14:17:07 2018
New Revision: 328243

URL: http://llvm.org/viewvc/llvm-project?rev=328243&view=rev
Log:
Fix test failure on Windows caused by different underlying enumeration type rules

Modified:
    cfe/trunk/test/SemaCXX/builtin-operator-new-delete.cpp

Modified: cfe/trunk/test/SemaCXX/builtin-operator-new-delete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/builtin-operator-new-delete.cpp?rev=328243&r1=328242&r2=328243&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/builtin-operator-new-delete.cpp (original)
+++ cfe/trunk/test/SemaCXX/builtin-operator-new-delete.cpp Thu Mar 22 14:17:07 2018
@@ -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;




More information about the cfe-commits mailing list