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
diff --git a/clang/test/CodeGenCXX/pragma-visibility.cpp b/clang/test/CodeGenCXX/pragma-visibility.cpp
index 05de786..2dc8bcc 100644
--- a/clang/test/CodeGenCXX/pragma-visibility.cpp
+++ b/clang/test/CodeGenCXX/pragma-visibility.cpp
@@ -63,10 +63,12 @@
#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
}