Skip to content
Snippets Groups Projects
Commit 2dfe2bdb authored by Hans Wennborg's avatar Hans Wennborg
Browse files

Merging r321777:

------------------------------------------------------------------------
r321777 | rsmith | 2018-01-03 17:02:18 -0800 (Wed, 03 Jan 2018) | 2 lines

PR35028: Retain duplicate alignas attributes in template instantiation.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_60@322676 91177308-0d34-0410-b5e6-96231b3b80d8
parent 27eb4d05
No related branches found
No related tags found
No related merge requests found
......@@ -549,6 +549,7 @@ def Aligned : InheritableAttr {
Keyword<"_Alignas">]>,
Accessor<"isDeclspec",[Declspec<"align">]>];
let Documentation = [Undocumented];
let DuplicatesAllowedWhileMerging = 1;
}
def AlignValue : Attr {
......
......@@ -21,3 +21,14 @@ struct C { char a[16]; };
static_assert(sizeof(my_union<A, B, C>) == 16, "");
static_assert(alignof(my_union<A, B, C>) == 8, "");
namespace PR35028 {
template<class X, int Alignment> struct alignas(X) alignas(long long) alignas(long double) alignas(Alignment) Aligned {
union {
long long align1;
long double align2;
char data[sizeof(X)];
};
};
Aligned<int, 1> a;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment