]> granicus.if.org Git - clang/commit
PR26547: alignof should return ABI alignment, not preferred alignment
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 26 Oct 2018 19:26:45 +0000 (19:26 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 26 Oct 2018 19:26:45 +0000 (19:26 +0000)
commita9671c2b454cb64c022cda40788ea39117237e12
tree1cb169676ac6af1de3f22bcbd833c5dd4fbea403
parent3f79e28a57a5aab3a41f489201c26bd803efe344
PR26547: alignof should return ABI alignment, not preferred alignment

Summary:
- Add `UETT_PreferredAlignOf` to account for the difference between `__alignof` and `alignof`
- `AlignOfType` now returns ABI alignment instead of preferred alignment iff clang-abi-compat > 7, and one uses _Alignof or alignof

Patch by Nicole Mazzuca!

Differential Revision: https://reviews.llvm.org/D53207

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345419 91177308-0d34-0410-b5e6-96231b3b80d8
21 files changed:
docs/ReleaseNotes.rst
include/clang/AST/Stmt.h
include/clang/ASTMatchers/ASTMatchers.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/LangOptions.h
include/clang/Basic/TypeTraits.h
lib/AST/ASTDumper.cpp
lib/AST/Expr.cpp
lib/AST/ExprConstant.cpp
lib/AST/ItaniumMangle.cpp
lib/AST/StmtPrinter.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Parse/ParseExpr.cpp
lib/Sema/SemaChecking.cpp
lib/Sema/SemaExpr.cpp
test/Headers/thumbv7-apple-ios-types.cpp
test/Sema/align-x86-abi7.c [new file with mode: 0644]
test/Sema/align-x86.c
test/SemaCXX/align-x86-abi7.cpp [new file with mode: 0644]
test/SemaCXX/align-x86.cpp [new file with mode: 0644]
test/SemaCXX/alignof.cpp