summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/attr-cxx0x.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-29 10:18:18 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-29 10:18:18 +0000
commit7dd5fe5ce60c8a7146980dc4a30a1574a719986a (patch)
tree4f8d3802e5a680a4ca973e06cf0e6a01c04e86a0 /clang/test/SemaCXX/attr-cxx0x.cpp
parent810ad3eb447e663984a79553e3c756a04ae7c418 (diff)
downloadbcm5719-llvm-7dd5fe5ce60c8a7146980dc4a30a1574a719986a.tar.gz
bcm5719-llvm-7dd5fe5ce60c8a7146980dc4a30a1574a719986a.zip
Produce a diagnostic if alignas is applied to an expression. Neither C11 nor
C++11 allows that. llvm-svn: 173789
Diffstat (limited to 'clang/test/SemaCXX/attr-cxx0x.cpp')
-rw-r--r--clang/test/SemaCXX/attr-cxx0x.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/SemaCXX/attr-cxx0x.cpp b/clang/test/SemaCXX/attr-cxx0x.cpp
index c2576e9b0e6..d038e637f4e 100644
--- a/clang/test/SemaCXX/attr-cxx0x.cpp
+++ b/clang/test/SemaCXX/attr-cxx0x.cpp
@@ -28,9 +28,9 @@ template <unsigned... A> alignas(A...) struct align_class_temp_pack_expr {}; //
typedef char align_typedef alignas(8); // expected-error {{'alignas' attribute only applies to variables, functions and tag types}}
template<typename T> using align_alias_template = align_typedef alignas(8); // expected-error {{'alignas' attribute cannot be applied to types}}
-static_assert(alignof(align_big) == alignof(int), "k's alignment is wrong");
-static_assert(alignof(align_small) == 1, "j's alignment is wrong");
-static_assert(alignof(align_multiple) == 8, "l's alignment is wrong");
+static_assert(alignof(align_big) == alignof(int), "k's alignment is wrong"); // expected-warning{{'alignof' applied to an expression is a GNU extension}}
+static_assert(alignof(align_small) == 1, "j's alignment is wrong"); // expected-warning{{'alignof' applied to an expression is a GNU extension}}
+static_assert(alignof(align_multiple) == 8, "l's alignment is wrong"); // expected-warning{{'alignof' applied to an expression is a GNU extension}}
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_class_template<8>) == 8, "template's alignment is wrong");
OpenPOWER on IntegriCloud