[PATCH] D53207: Fix bug 26547 - alignof should return ABI alignment, not preferred alignment

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 25 11:54:25 PDT 2018


rsmith added a comment.

In https://reviews.llvm.org/D53207#1276062, @ubsan wrote:

> I don't actually know how to send this upstream, since it's been accepted... How should I proceed?


If you don't have an SVN account, you can ask someone who does to commit it for you. (In this case, I'll do it.)

A few minor nit first, though :)



================
Comment at: docs/ReleaseNotes.rst:80
 
+- `-fclang-abi-compat` can now be set to version 7
+  - As of clang 8, `alignof` and `_Alignof` return the ABI alignment of a type,
----------------
I don't think we need to say this. It could be set to 7 before, it just had no effect.


================
Comment at: docs/ReleaseNotes.rst:152
+    `alignas(alignof(T))`.
+  - If you have interfaces which are broken by this change, you may wish
+    to switch to `alignas(__alignof(T))`, instead of using the
----------------
which -> that


================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5478
 def ext_sizeof_alignof_function_type : Extension<
-  "invalid application of '%select{sizeof|alignof|vec_step}0' to a "
+  "invalid application of '%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align|__alignof}0' to a "
   "function type">, InGroup<PointerArith>;
----------------
rsmith wrote:
> Please factor out this repeated %select and use a %sub instead.
I think you may have missed this comment.


Repository:
  rC Clang

https://reviews.llvm.org/D53207





More information about the cfe-commits mailing list