Make sure that we recognize __attribute__((align)) as a synonym for

__attribute__((aligned)). Fixes <rdar://problem/11435441>, a
regression I introduced in r156003. This is the narrow fix; a more
comprehensive fix is coming.

llvm-svn: 156657
This commit is contained in:
Douglas Gregor 2012-05-11 23:01:43 +00:00
parent 5d60c36f37
commit 4f362c7960
2 changed files with 2 additions and 1 deletions

View File

@ -3792,6 +3792,7 @@ static void ProcessInheritableDeclAttr(Sema &S, Scope *scope, Decl *D,
// by ProcessNonInheritableDeclAttr.
break;
case AttributeList::AT_alias: handleAliasAttr (S, D, Attr); break;
case AttributeList::AT_align:
case AttributeList::AT_aligned: handleAlignedAttr (S, D, Attr); break;
case AttributeList::AT_always_inline:
handleAlwaysInlineAttr (S, D, Attr); break;

View File

@ -32,7 +32,7 @@ struct D { int member __attribute__((aligned(2))) __attribute__((packed)); } d;
char d1[__alignof__(d) == 2 ?: -1] = {0};
char d2[__alignof__(d.member) == 2 ?: -1] = {0};
struct E { int member __attribute__((aligned(2))); } __attribute__((packed));
struct E { int member __attribute__((align(2))); } __attribute__((packed));
struct E e;
char e1[__alignof__(e) == 2 ?: -1] = {0};
char e2[__alignof__(e.member) == 2 ?: -1] = {0};