From: Rafael Espindola Date: Sat, 28 Jul 2012 02:51:03 +0000 (+0000) Subject: Add a missing testcase for merging the visibility of two declarations used X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d4a40edb5854d4723e7d25b0e908310b54cc6a0;p=clang Add a missing testcase for merging the visibility of two declarations used as arguments of a template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160911 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGenCXX/visibility.cpp b/test/CodeGenCXX/visibility.cpp index 590c06e4d0..d2f58f968d 100644 --- a/test/CodeGenCXX/visibility.cpp +++ b/test/CodeGenCXX/visibility.cpp @@ -1077,3 +1077,20 @@ namespace test58 { // CHECK: define linkonce_odr hidden void @_ZN6test583barINS_3fooEE3zedEv // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test583barINS_3fooEE3zedEv } + +namespace test59 { + DEFAULT int f(); + HIDDEN int g(); + typedef int (*foo)(); + template + void test() {} + void use() { + test<&g, &f>(); + // CHECK: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1gEvEEXadL_ZNS_1fEvEEEEvv + // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1gEvEEXadL_ZNS_1fEvEEEEvv + + test<&f, &g>(); + // CHECK: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1fEvEEXadL_ZNS_1gEvEEEEvv + // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1fEvEEXadL_ZNS_1gEvEEEEvv + } +}