]> granicus.if.org Git - llvm/commitdiff
Revert "Remove static_assert(value == std::is_trivially_copyable<T>::value)"
authorVitaly Buka <vitalybuka@google.com>
Tue, 22 Jan 2019 07:22:45 +0000 (07:22 +0000)
committerVitaly Buka <vitalybuka@google.com>
Tue, 22 Jan 2019 07:22:45 +0000 (07:22 +0000)
Upgraded the bot as workaround.

This reverts commit r351784.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351786 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/type_traits.h

index a52bd408d27f6599c34a9942756fee874d8a8827..b8cf12d03d286e16d5711775a7c2899186b53ee4 100644 (file)
@@ -162,6 +162,10 @@ class is_trivially_copyable {
       (has_deleted_move_constructor || has_trivial_move_constructor) &&
       (has_deleted_copy_assign || has_trivial_copy_assign) &&
       (has_deleted_copy_constructor || has_trivial_copy_constructor);
+
+#if (__has_feature(is_trivially_copyable) || (defined(__GNUC__) && __GNUC__ >= 5))
+  static_assert(value == std::is_trivially_copyable<T>::value, "inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable");
+#endif
 };