rjmccall added inline comments.

================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:6416
+  if (D->hasAttr<TrivialABIAttr>())
+    return true;
+
----------------
I don't think we can just unconditionally check for the attribute.  The rule 
for `trivial_abi` is that it overrides direct sources of non-triviality, but if 
there's a subobject which can't be safely passed in registers, we'll still pass 
aggregates indirectly.  This means we can safely add the attribute whenever a 
class's own special members don't rely on non-triviality without having to 
recursively check the component types.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92361

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to