diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2011-10-23 17:07:16 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-10-23 17:07:16 +0000 |
| commit | e109a2ca59820af5852fee0e2be2e633403e76d3 (patch) | |
| tree | 07aa37385c1197e4a9ddf65d3ed58cbf70c75431 /clang/test/SemaCXX/attr-cxx0x.cpp | |
| parent | 1695466fe3ec8f62176ec5c3793e580cfd4f3d5b (diff) | |
| download | bcm5719-llvm-e109a2ca59820af5852fee0e2be2e633403e76d3.tar.gz bcm5719-llvm-e109a2ca59820af5852fee0e2be2e633403e76d3.zip | |
Attach class template attributes to the templated CXXRecordDecl,
instead of silently discarding them.
As a side effect, this improves diagnostics for constexpr class
templates slightly.
llvm-svn: 142755
Diffstat (limited to 'clang/test/SemaCXX/attr-cxx0x.cpp')
| -rw-r--r-- | clang/test/SemaCXX/attr-cxx0x.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/attr-cxx0x.cpp b/clang/test/SemaCXX/attr-cxx0x.cpp index de9d7d1c2a6..5d02cfca343 100644 --- a/clang/test/SemaCXX/attr-cxx0x.cpp +++ b/clang/test/SemaCXX/attr-cxx0x.cpp @@ -9,6 +9,8 @@ struct align_member { int member alignas(8); }; +template <unsigned A> alignas(A) struct align_class_template {}; + typedef char align_typedef alignas(8); template<typename T> using align_alias_template = align_typedef; @@ -18,4 +20,6 @@ static_assert(alignof(align_multiple) == 8, "l's alignment is wrong"); static_assert(alignof(align_member) == 8, "quuux's alignment is wrong"); static_assert(sizeof(align_member) == 8, "quuux's size is wrong"); static_assert(alignof(align_typedef) == 8, "typedef's alignment is wrong"); +static_assert(alignof(align_class_template<8>) == 8, "template's alignment is wrong"); +static_assert(alignof(align_class_template<16>) == 16, "template's alignment is wrong"); static_assert(alignof(align_alias_template<int>) == 8, "alias template's alignment is wrong"); |

