]> granicus.if.org Git - clang/commit
__attribute__((aligned(n))) directly specifies the alignment of a declaration
authorJohn McCall <rjmccall@apple.com>
Fri, 8 Oct 2010 18:24:19 +0000 (18:24 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 8 Oct 2010 18:24:19 +0000 (18:24 +0000)
commit4081a5c5f1381c4ec77f8ab3866693917e4329c4
treebad605bb8a474ce0e4167dba8a134844d6c1bd8e
parent67c32268c0891b539fe9da26d10579e2ebfc9b38
__attribute__((aligned(n))) directly specifies the alignment of a declaration
unless it's a non-packed field, in which case it can only increase the
alignment.  [[align]] effectively works the same way for well-formed code
(because it's ill-formed for [[align]] to decrease alignment ever).

Fixes rdar://problem/8335865

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116070 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTContext.cpp
test/Sema/attr-aligned.c
test/SemaCXX/attr-cxx0x.cpp