[AST][SVE] Treat built-in SVE types as trivial
Built-in SVE types are trivial, since they're trivially copyable and support default construction. Differential Revision: https://reviews.llvm.org/D76692
This commit is contained in:
parent
35392660e6
commit
c6824883cc
|
|
@ -2249,6 +2249,9 @@ bool QualType::isTrivialType(const ASTContext &Context) const {
|
|||
if ((*this)->isArrayType())
|
||||
return Context.getBaseElementType(*this).isTrivialType(Context);
|
||||
|
||||
if ((*this)->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 ((*this)->isIncompleteType())
|
||||
|
|
|
|||
|
|
@ -516,6 +516,7 @@ void cxx_only(int sel) {
|
|||
_Static_assert(!__is_literal(svint8_t), "");
|
||||
_Static_assert(__is_pod(svint8_t), "");
|
||||
_Static_assert(!__is_polymorphic(svint8_t), "");
|
||||
_Static_assert(__is_trivial(svint8_t), "");
|
||||
_Static_assert(__is_object(svint8_t), "");
|
||||
_Static_assert(!__is_arithmetic(svint8_t), "");
|
||||
_Static_assert(!__is_floating_point(svint8_t), "");
|
||||
|
|
|
|||
Loading…
Reference in New Issue