[PATCH] D76690: [AST][SVE] Treat built-in SVE types as POD
Richard Sandiford via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 27 10:20:46 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9dcb20a7d008: [AST][SVE] Treat built-in SVE types as POD (authored by rsandifo-arm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76690/new/
https://reviews.llvm.org/D76690
Files:
clang/lib/AST/Type.cpp
clang/test/SemaCXX/sizeless-1.cpp
Index: clang/test/SemaCXX/sizeless-1.cpp
===================================================================
--- clang/test/SemaCXX/sizeless-1.cpp
+++ clang/test/SemaCXX/sizeless-1.cpp
@@ -266,6 +266,7 @@
__builtin_va_list va;
__builtin_va_start(va, first);
+ __builtin_va_arg(va, svint8_t);
__builtin_va_end(va);
return count;
}
@@ -491,6 +492,16 @@
_Static_assert(!__is_assignable(svint8_t, svint8_t), "");
_Static_assert(__is_assignable(svint8_t &, svint8_t), "");
_Static_assert(!__is_assignable(svint8_t &, svint16_t), "");
+ _Static_assert(__has_nothrow_assign(svint8_t), "");
+ _Static_assert(__has_nothrow_move_assign(svint8_t), "");
+ _Static_assert(__has_nothrow_copy(svint8_t), "");
+ _Static_assert(__has_nothrow_constructor(svint8_t), "");
+ _Static_assert(__has_trivial_assign(svint8_t), "");
+ _Static_assert(__has_trivial_move_assign(svint8_t), "");
+ _Static_assert(__has_trivial_copy(svint8_t), "");
+ _Static_assert(__has_trivial_constructor(svint8_t), "");
+ _Static_assert(__has_trivial_move_constructor(svint8_t), "");
+ _Static_assert(__has_trivial_destructor(svint8_t), "");
_Static_assert(!__has_virtual_destructor(svint8_t), "");
_Static_assert(!__is_abstract(svint8_t), "");
_Static_assert(!__is_aggregate(svint8_t), "");
@@ -502,6 +513,7 @@
_Static_assert(!__is_enum(svint8_t), "");
_Static_assert(!__is_final(svint8_t), "");
_Static_assert(!__is_literal(svint8_t), "");
+ _Static_assert(__is_pod(svint8_t), "");
_Static_assert(!__is_polymorphic(svint8_t), "");
_Static_assert(__is_object(svint8_t), "");
_Static_assert(!__is_arithmetic(svint8_t), "");
Index: clang/lib/AST/Type.cpp
===================================================================
--- clang/lib/AST/Type.cpp
+++ clang/lib/AST/Type.cpp
@@ -2496,6 +2496,9 @@
const Type *BaseTy = ty->getBaseElementTypeUnsafe();
assert(BaseTy && "NULL element type");
+ if (BaseTy->isSizelessBuiltinType())
+ return true;
+
// Return false for incomplete types after skipping any incomplete array
// types which are expressly allowed by the standard and thus our API.
if (BaseTy->isIncompleteType())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76690.253160.patch
Type: text/x-patch
Size: 2163 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200327/22e0196e/attachment.bin>
More information about the cfe-commits
mailing list