aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/attr-cxx0x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/attr-cxx0x.cpp')
-rw-r--r--test/SemaCXX/attr-cxx0x.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/attr-cxx0x.cpp b/test/SemaCXX/attr-cxx0x.cpp
index fed0ad42d8..da52d338cf 100644
--- a/test/SemaCXX/attr-cxx0x.cpp
+++ b/test/SemaCXX/attr-cxx0x.cpp
@@ -22,3 +22,15 @@ static_assert(alignof(align_small) == alignof(int), "j's alignment is wrong");
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");
+
+int bc_fail [[base_check]]; // expected-error {{'base_check' attribute only applies to class types}}
+int hiding_fail [[hiding]]; // expected-error {{'hiding' attribute only applies to member types}}
+int override_fail [[override]]; // expected-error {{'override' attribute only applies to virtual method types}}
+
+struct base {
+ virtual void function();
+ virtual void other_function();
+};
+
+struct [[base_check, base_check]] bc : base { // expected-error {{'base_check' attribute cannot be repeated}}
+}; \ No newline at end of file