summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/visibility.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2013-02-21 23:42:58 +0000
committerJohn McCall <rjmccall@apple.com>2013-02-21 23:42:58 +0000
commit5f46c485148917307d544f943269b13f0c80dd32 (patch)
tree888394806530fadd96c72d7250baf927f55b5ed9 /clang/test/CodeGenCXX/visibility.cpp
parentb169f559612d4c349939ea27192259d417b4c81f (diff)
downloadbcm5719-llvm-5f46c485148917307d544f943269b13f0c80dd32.tar.gz
bcm5719-llvm-5f46c485148917307d544f943269b13f0c80dd32.zip
Ignore visibility from enclosing template arguments
for explicit member specializations. llvm-svn: 175827
Diffstat (limited to 'clang/test/CodeGenCXX/visibility.cpp')
-rw-r--r--clang/test/CodeGenCXX/visibility.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/visibility.cpp b/clang/test/CodeGenCXX/visibility.cpp
index cfddc8c0c29..b9dec173017 100644
--- a/clang/test/CodeGenCXX/visibility.cpp
+++ b/clang/test/CodeGenCXX/visibility.cpp
@@ -1182,3 +1182,48 @@ namespace test64 {
template class B<A>;
// CHECK: define weak_odr hidden void @_ZN6test641BINS_1AEE3fooEv()
}
+
+namespace test65 {
+ class HIDDEN A {};
+ template <class T> struct B {
+ static void func();
+ template <class U> static void funcT1();
+ template <class U> static void funcT2();
+ class Inner {};
+ template <class U> class InnerT {};
+ };
+ template <template <class T> class Temp> struct C {
+ static void foo() {}
+ };
+
+ // CHECK: define void @_ZN6test651BINS_1AEE4funcEv()
+ template <> DEFAULT void B<A>::func() {}
+
+ // CHECK: define void @_ZN6test651BINS_1AEE6funcT2IS1_EEvv()
+ template <> template <> DEFAULT void B<A>::funcT2<A>() {}
+
+ // CHECK: define linkonce_odr void @_ZN6test651BINS_1AEE6funcT1IiEEvv()
+ // CHECK: define linkonce_odr hidden void @_ZN6test651BINS_1AEE6funcT1IS1_EEvv()
+ template <> template <class T> DEFAULT void B<A>::funcT1() {}
+
+ // CHECK: define linkonce_odr void @_ZN6test651BINS_1AEE5Inner3fooEv()
+ template <> struct DEFAULT B<A>::Inner {
+ static void foo() {}
+ };
+
+ // CHECK: define linkonce_odr void @_ZN6test651BINS_1AEE6InnerTIiE3fooEv()
+ // CHECK: define linkonce_odr hidden void @_ZN6test651BINS_1AEE6InnerTIS1_E3fooEv()
+ template <> template <class U> struct DEFAULT B<A>::InnerT {
+ static void foo() {}
+ };
+
+ void test() {
+ B<A>::funcT1<int>();
+ B<A>::funcT1<A>();
+ B<A>::Inner::foo();
+ B<A>::InnerT<int>::foo();
+ B<A>::InnerT<A>::foo();
+ }
+
+ template class C<B<A>::InnerT>;
+}
OpenPOWER on IntegriCloud