aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/attr-cxx0x.cpp
diff options
context:
space:
mode:
authorSean Hunt <rideau3@gmail.com>2009-11-25 04:20:27 +0000
committerSean Hunt <rideau3@gmail.com>2009-11-25 04:20:27 +0000
commit7725e67639fa2fe74f8775b7ed884a076ffdbffc (patch)
treeb518c376db3544834ecabb7afdd3b82554a6a83e /test/SemaCXX/attr-cxx0x.cpp
parent717a5955e93aa7ecf1b8878a9f2c90ead9a71c38 (diff)
Parse C++ member check attributes - base_check, hiding, and override.
The attributes are currently ignored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89837 91177308-0d34-0410-b5e6-96231b3b80d8
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