diff options
author | John McCall <rjmccall@apple.com> | 2011-03-04 10:39:25 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-03-04 10:39:25 +0000 |
commit | 1a0918ade0a3490c7aff243f9cd519156dfcb0bd (patch) | |
tree | 49bd1c63937db53c9cd432d0be12933bd0687721 /test/CodeGenCXX/visibility.cpp | |
parent | fb4eb9f56c1b7bb4fb632127a5e2d253b65758bf (diff) |
Don't consider visibility from template parameter lists if we're
computing for a nested decl with explicit visibility. This is all part
of the general philosophy of explicit visibility attributes, where
any information that was obviously available at the attribute site
should probably be ignored. Fixes PR9371.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/visibility.cpp')
-rw-r--r-- | test/CodeGenCXX/visibility.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenCXX/visibility.cpp b/test/CodeGenCXX/visibility.cpp index 931465060b..7644e47ff7 100644 --- a/test/CodeGenCXX/visibility.cpp +++ b/test/CodeGenCXX/visibility.cpp @@ -411,3 +411,14 @@ namespace Test20 { B<A<2> >::test5(); } } + +// PR9371 +namespace test21 { + enum En { en }; + template<En> struct A { + __attribute__((visibility("default"))) void foo() {} + }; + + // CHECK: define weak_odr void @_ZN6test211AILNS_2EnE0EE3fooEv( + template void A<en>::foo(); +} |