summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/elaborated-type-specifier.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2014-05-14 18:31:48 +0000
committerJohn McCall <rjmccall@apple.com>2014-05-14 18:31:48 +0000
commit6c2c5c652482721febec7208ba669646ca7a1aa9 (patch)
treeea7a477c8602716bd8c9d7fe11713c635bdc228e /test/SemaCXX/elaborated-type-specifier.cpp
parent00b2b6dc046fad719d2d53f4d709641b34630ca8 (diff)
When we generate a redeclaration for an
elaborated-type-specifier, place it in the correct context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/elaborated-type-specifier.cpp')
-rw-r--r--test/SemaCXX/elaborated-type-specifier.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/elaborated-type-specifier.cpp b/test/SemaCXX/elaborated-type-specifier.cpp
index 1b1770a89f..81c5cb4eac 100644
--- a/test/SemaCXX/elaborated-type-specifier.cpp
+++ b/test/SemaCXX/elaborated-type-specifier.cpp
@@ -43,3 +43,12 @@ int test_funcparam_scope(struct S5 * s5) {
if (s5 == s5_2) return 1; // expected-error {{comparison of distinct pointer types ('struct S5 *' and 'struct S5 *')}}
return 0;
}
+
+namespace test5 {
+ struct A {
+ class __attribute__((visibility("hidden"))) B {};
+
+ void test(class __attribute__((visibility("hidden"), noreturn)) B b) { // expected-warning {{'noreturn' attribute only applies to functions and methods}}
+ }
+ };
+}