diff options
author | John McCall <rjmccall@apple.com> | 2010-12-10 02:59:44 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-10 02:59:44 +0000 |
commit | 2faf32c4fdcaf65ffef3dcbb9cb12e520c4d7561 (patch) | |
tree | 0867fa44da6f34bd6aab2e0de376349f40bd85e1 /clang/test/CodeGenCXX/pragma-visibility.cpp | |
parent | b761ee687f982a12c9b6d93a292a84af431bec7d (diff) | |
download | bcm5719-llvm-2faf32c4fdcaf65ffef3dcbb9cb12e520c4d7561.tar.gz bcm5719-llvm-2faf32c4fdcaf65ffef3dcbb9cb12e520c4d7561.zip |
Treat visibility on an enclosing namespace as a non-explicit source of
visibility. Fixes PR8713.
I've disabled a test which was testing that you can #pragma pop visibility
to get out of a namespace's visibility attribute. We should probably just
diagnose that as an error unless it's instrumental to someone's system
headers.
llvm-svn: 121459
Diffstat (limited to 'clang/test/CodeGenCXX/pragma-visibility.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/pragma-visibility.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/pragma-visibility.cpp b/clang/test/CodeGenCXX/pragma-visibility.cpp index 05de78670a0..2dc8bcc74fa 100644 --- a/clang/test/CodeGenCXX/pragma-visibility.cpp +++ b/clang/test/CodeGenCXX/pragma-visibility.cpp @@ -63,10 +63,12 @@ namespace n __attribute((visibility("default"))) { #pragma GCC visibility pop } +// We used to test this, but it's insane, so unless it happens in +// headers, we should not support it. namespace n __attribute((visibility("hidden"))) { extern int foofoo; // FIXME: Shouldn't be necessary, but otherwise the pragma // gets to Sema before the namespace! #pragma GCC visibility pop void h() {} - // CHECK: define void @_ZN1n1hEv + // CHECK disabled: define void @_ZN1n1hEv } |