diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-26 01:26:03 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-26 01:26:03 +0000 |
| commit | 4c3db23d1c93bf25c92f6b5e4e1ac5dc76838a6a (patch) | |
| tree | cbfe1e6328ec334049b172f8ae6a373556350873 /clang/test/Sema | |
| parent | 9f7ad310b584af69fd422b8426fa5e81e1c79790 (diff) | |
| download | bcm5719-llvm-4c3db23d1c93bf25c92f6b5e4e1ac5dc76838a6a.tar.gz bcm5719-llvm-4c3db23d1c93bf25c92f6b5e4e1ac5dc76838a6a.zip | |
Reject cases like
struct __attribute__((visibility("hidden"))) a;
struct __attribute__((visibility("default"))) b;
which gcc already rejects.
llvm-svn: 155603
Diffstat (limited to 'clang/test/Sema')
| -rw-r--r-- | clang/test/Sema/attr-visibility.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-visibility.c b/clang/test/Sema/attr-visibility.c index 5cf269582ab..afeb4f1546f 100644 --- a/clang/test/Sema/attr-visibility.c +++ b/clang/test/Sema/attr-visibility.c @@ -7,3 +7,5 @@ void test2() __attribute__((visibility("internal"))); // rdar://problem/10753392 void test3() __attribute__((visibility("protected"))); // expected-warning {{target does not support 'protected' visibility; using 'default'}} +struct __attribute__((visibility("hidden"))) test4; // expected-note {{previous attribute is here}} +struct __attribute__((visibility("default"))) test4; // expected-error {{visibility does not match previous declaration}} |

