diff options
author | Hans Wennborg <hans@hanshq.net> | 2018-01-17 16:13:22 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2018-01-17 16:13:22 +0000 |
commit | 2dfe2bdba5bc7a7401e1023cd794ad362a24742d (patch) | |
tree | c1ec2e295d941d47014bbc48e1f407f2911d45d4 /test | |
parent | 27eb4d05f0800ec42f9723604969c27ef4296f41 (diff) |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/SemaTemplate/alignas.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaTemplate/alignas.cpp b/test/SemaTemplate/alignas.cpp index 8a1f96e5bd..680f07b329 100644 --- a/test/SemaTemplate/alignas.cpp +++ b/test/SemaTemplate/alignas.cpp @@ -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; +} |