diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-05-02 20:36:57 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-05-02 20:36:57 +0000 |
commit | cd997e02b25fbda462817c35d34157bb006a119c (patch) | |
tree | c7eb4bf749b398f37820cb33daff615de8c25e83 /clang/test/Sema/attr-visibility.c | |
parent | c2d64c428a8a924405e905a3a42794ebc85f0aa8 (diff) | |
download | bcm5719-llvm-cd997e02b25fbda462817c35d34157bb006a119c.tar.gz bcm5719-llvm-cd997e02b25fbda462817c35d34157bb006a119c.zip |
Walk the decls looking for the last one that has an attribute. We do have to walk
them, otherwise we cannot produce an error for both
struct HIDDEN test4; // canonical
struct test4;
struct DEFAULT test4;
and
struct test5; // canonical
struct HIDDEN test5;
struct DEFAULT test5;
llvm-svn: 156016
Diffstat (limited to 'clang/test/Sema/attr-visibility.c')
-rw-r--r-- | clang/test/Sema/attr-visibility.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-visibility.c b/clang/test/Sema/attr-visibility.c index 499111f86cc..4996dca5be7 100644 --- a/clang/test/Sema/attr-visibility.c +++ b/clang/test/Sema/attr-visibility.c @@ -10,3 +10,7 @@ void test3() __attribute__((visibility("protected"))); // expected-warning {{tar struct __attribute__((visibility("hidden"))) test4; // expected-note {{previous attribute is here}} struct test4; struct __attribute__((visibility("default"))) test4; // expected-error {{visibility does not match previous declaration}} + +struct test5; +struct __attribute__((visibility("hidden"))) test5; // expected-note {{previous attribute is here}} +struct __attribute__((visibility("default"))) test5; // expected-error {{visibility does not match previous declaration}} |