diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-10-23 20:07:52 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-10-23 20:07:52 +0000 |
commit | 0b64ba926752110cff1344a46b36e29396cc4d25 (patch) | |
tree | ed999558db79f28ac0635a51d3e6d18288cc4d40 /test | |
parent | 678b89e974ca73e15b5cb7ad30c9a7a4cadcc67a (diff) |
Fix grammar for C++11 alignment specifiers, and add a few FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CXX/temp/temp.decls/temp.variadic/p5.cpp | 3 | ||||
-rw-r--r-- | test/SemaCXX/attr-cxx0x.cpp | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp index bade856f60..a0b55804b9 100644 --- a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp +++ b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp @@ -160,8 +160,9 @@ struct TestUnexpandedTTP { }; // Test for unexpanded parameter packs in declarations. -// FIXME: Attributes? template<typename T, typename... Types> +// FIXME: this should test that the diagnostic reads "type contains..." +alignas(Types) // expected-error{{expression contains unexpanded parameter pack 'Types'}} struct TestUnexpandedDecls : T{ void member_function(Types); // expected-error{{declaration type contains unexpanded parameter pack 'Types'}} void member_function () throw(Types); // expected-error{{declaration type contains unexpanded parameter pack 'Types'}} diff --git a/test/SemaCXX/attr-cxx0x.cpp b/test/SemaCXX/attr-cxx0x.cpp index 5d02cfca34..c697a7d152 100644 --- a/test/SemaCXX/attr-cxx0x.cpp +++ b/test/SemaCXX/attr-cxx0x.cpp @@ -11,6 +11,10 @@ struct align_member { template <unsigned A> alignas(A) struct align_class_template {}; +// FIXME: these should not error +template <typename... T> alignas(T...) struct align_class_temp_pack_type {}; // expected-error{{pack expansions in alignment specifiers are not supported yet}} +template <unsigned... A> alignas(A...) struct align_class_temp_pack_expr {}; // expected-error{{pack expansions in alignment specifiers are not supported yet}} + typedef char align_typedef alignas(8); template<typename T> using align_alias_template = align_typedef; @@ -22,4 +26,7 @@ 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"); +// FIXME: enable these tests +// static_assert(alignof(align_class_temp_pack_type<short, int, long>) == alignof(long), "template's alignment is wrong"); +// static_assert(alignof(align_class_temp_pack_expr<8, 16, 32>) == 32, "template's alignment is wrong"); static_assert(alignof(align_alias_template<int>) == 8, "alias template's alignment is wrong"); |