[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
Tue Oct 23 20:34:36 PDT 2018


rsmith added a comment.

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

> when I don't specifically don't set the type trait kind of `__alignof` to `UETT_PreferredAlignOf`, and remove the code in `AlignOfType` to differentiate between `PreferredAlignOf` and `AlignOf`, all the tests pass again.


You've extended `UnaryExprOrTypeTrait` from having 4 enumerators to 5, which means it no longer fits in a 2-bit bitfield. `Stmt::UnaryExprOrTypeTraitExprBitfields::Kind` needs to be made wider.


Repository:
  rC Clang

https://reviews.llvm.org/D53207





More information about the cfe-commits mailing list