[PATCH] D76692: [AST][SVE] Treat built-in SVE types as trivial

Richard Sandiford via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 27 10:55:54 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc6824883cc9d: [AST][SVE] Treat built-in SVE types as trivial (authored by rsandifo-arm).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76692/new/

https://reviews.llvm.org/D76692

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
@@ -516,6 +516,7 @@
   _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), "");
Index: clang/lib/AST/Type.cpp
===================================================================
--- clang/lib/AST/Type.cpp
+++ clang/lib/AST/Type.cpp
@@ -2249,6 +2249,9 @@
   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())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76692.253172.patch
Type: text/x-patch
Size: 1071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200327/a4f3b49a/attachment.bin>


More information about the cfe-commits mailing list