Skip to content
Commit 475b25ee authored by David Majnemer's avatar David Majnemer
Browse files

AST: Don't ignore alignas on EnumDecls when calculating alignment

We didn't consider any alignment attributes on an EnumDecl when
calculating alignment.

While we are here, ignore alignment specifications on typedef types if
one is used as the underlying type.  Otherwise, weird things happen:

enum Y : int;
Y y;

typedef int __attribute__((aligned(64))) u;
enum Y : u {};

What is the alignment of 'Y'?  It would be more consistent with the
overall design of enums with fixed underlying types to consider the
underlying type's UnqualifiedDesugaredType.

This fixes PR22279.

llvm-svn: 226653
parent 435cf8a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment