[libcxx] r273068 - Work around GCC bug in tests. The bug has been fixed in GCC 6.0

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 17 16:30:40 PDT 2016


Author: ericwf
Date: Fri Jun 17 18:30:40 2016
New Revision: 273068

URL: http://llvm.org/viewvc/llvm-project?rev=273068&view=rev
Log:
Work around GCC bug in tests. The bug has been fixed in GCC 6.0

Modified:
    libcxx/trunk/test/std/experimental/filesystem/fs.enum/check_bitmask_types.hpp

Modified: libcxx/trunk/test/std/experimental/filesystem/fs.enum/check_bitmask_types.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.enum/check_bitmask_types.hpp?rev=273068&r1=273067&r2=273068&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.enum/check_bitmask_types.hpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.enum/check_bitmask_types.hpp Fri Jun 17 18:30:40 2016
@@ -17,7 +17,7 @@ template <class EnumType, EnumType Val1,
 struct check_bitmask_type {
 
   static constexpr UT dcast(EnumType e) { return static_cast<UT>(e); }
-  static constexpr UT unpromote(decltype(~UZero) promoted) { return static_cast<UT>(promoted); }
+  static constexpr UT unpromote(decltype((~UZero)) promoted) { return static_cast<UT>(promoted); }
   // We need two values that are non-zero and share at least one bit.
   static_assert(Val1 != Zero && Val2 != Zero, "");
   static_assert(Val1 != Val2, "");
@@ -31,7 +31,7 @@ struct check_bitmask_type {
       ASSERT_SAME_TYPE(EnumType, decltype(Val1 & Val2));
       ASSERT_SAME_TYPE(EnumType, decltype(Val1 | Val2));
       ASSERT_SAME_TYPE(EnumType, decltype(Val1 ^ Val2));
-      ASSERT_SAME_TYPE(EnumType, decltype(~Val1));
+      ASSERT_SAME_TYPE(EnumType, decltype((~Val1)));
       ASSERT_SAME_TYPE(EnumType&, decltype(ValRef &= Val2));
       ASSERT_SAME_TYPE(EnumType&, decltype(ValRef |= Val2));
       ASSERT_SAME_TYPE(EnumType&, decltype(ValRef ^= Val2));




More information about the cfe-commits mailing list