[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 20 16:08:01 PDT 2017


rsmith added inline comments.


================
Comment at: lib/Sema/SemaExprCXX.cpp:4088-4089
 
   // C++1z [meta.unary.prop]:
   //   remove_all_extents_t<T> shall be a complete type or cv void.
   case UTT_IsAggregate:
----------------
Please move the UTT_Has* cases up here, since this is the rule that actually applies to them.


================
Comment at: lib/Sema/SemaExprCXX.cpp:4109
+        Loc, ArgTy, diag::err_incomplete_type_used_in_type_trait_expr);
   // Per the GCC type traits documentation, the same constraints apply to these.
   case UTT_HasNothrowAssign:
----------------
Please update this comment to indicate that the GCC documentation is wrong about the constraints that GCC actually imposes on these traits.


https://reviews.llvm.org/D34198





More information about the cfe-commits mailing list