]> granicus.if.org Git - clang/commitdiff
Fix test failure on Windows caused by different underlying enumeration type rules
authorEric Fiselier <eric@efcs.ca>
Thu, 22 Mar 2018 21:17:07 +0000 (21:17 +0000)
committerEric Fiselier <eric@efcs.ca>
Thu, 22 Mar 2018 21:17:07 +0000 (21:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328243 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/builtin-operator-new-delete.cpp

index fb5e9a4857452c6e5150ffb38eb9593a4c08706d..40d47329effb60ebbfe6ebf20756281686e417d9 100644 (file)
@@ -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;