rjmccall added inline comments.

================
Comment at: lib/Sema/SemaExprCXX.cpp:946
+  // is larger than the minimum alignment the libc++abi runtime guarantees.
+  if (Context.getTargetInfo().getTriple().isOSDarwin()) {
+    CharUnits TypeAlign = Context.getTypeAlignInChars(Ty);
----------------
ahatanak wrote:
> rjmccall wrote:
> > Why is this a Darwin-specific check?  Seems like it ought to be an 
> > Itanium-specific check, but it's equally applicable on Linux to 
> > highly-aligned types.
> Except when the C++ ABI is Microsoft, this is always diagnosed.
Thanks.  Please don't refer to `libc++abi` in this comment, though, since this 
is a general Itanium issue and not specific to any particular implementation.  
How about something like:

  Under the Itanium C++ ABI, memory for the exception object is allocated by 
the runtime with no ability for the compiler to request additional alignment.  
Warn if the exception type requires alignment beyond the minimum guaranteed by 
the target C++ runtime.


Repository:
  rC Clang

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

https://reviews.llvm.org/D61667



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

Reply via email to