aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Parser/cxx11-stmt-attributes.cpp2
-rw-r--r--test/SemaCXX/cxx11-attr-print.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/test/Parser/cxx11-stmt-attributes.cpp b/test/Parser/cxx11-stmt-attributes.cpp
index f26db7989f..a9958471d6 100644
--- a/test/Parser/cxx11-stmt-attributes.cpp
+++ b/test/Parser/cxx11-stmt-attributes.cpp
@@ -27,7 +27,7 @@ void foo(int i) {
[[unknown_attribute]] return; // expected-warning {{unknown attribute 'unknown_attribute' ignored}}
- alignas(8) ; // expected-warning {{attribute aligned cannot be specified on a statement}}
+ alignas(8) ; // expected-warning {{attribute alignas cannot be specified on a statement}}
[[noreturn]] { } // expected-warning {{attribute noreturn cannot be specified on a statement}}
[[noreturn]] if (0) { } // expected-warning {{attribute noreturn cannot be specified on a statement}}
[[noreturn]] for (;;); // expected-warning {{attribute noreturn cannot be specified on a statement}}
diff --git a/test/SemaCXX/cxx11-attr-print.cpp b/test/SemaCXX/cxx11-attr-print.cpp
index 3cc6d00f08..77df65a45c 100644
--- a/test/SemaCXX/cxx11-attr-print.cpp
+++ b/test/SemaCXX/cxx11-attr-print.cpp
@@ -17,6 +17,12 @@ int a __attribute__((deprecated("warning")));
// CHECK: gnu::deprecated("warning")]];
int b [[gnu::deprecated("warning")]];
+// CHECK: int cxx11_alignas alignas(4, 0);
+alignas(4) int cxx11_alignas;
+
+// CHECK: int c11_alignas _Alignas(alignof(int), 0);
+_Alignas(int) int c11_alignas;
+
// CHECK: void foo() __attribute__((const));
void foo() __attribute__((const));