diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-23 14:02:53 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-23 14:02:53 +0000 |
commit | 546ee6dbcafa8a0dc6342497573fafa560be66f8 (patch) | |
tree | abd4104d70ecf8e727d9d74126a19372b08fcada | |
parent | 219cd6cb5f73362a8b64fb8e89a2bee363dc6c57 (diff) |
Add another testcase that was not being covered.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155351 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGenCXX/visibility.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/visibility.cpp b/test/CodeGenCXX/visibility.cpp index b9ed373001..d126de3d05 100644 --- a/test/CodeGenCXX/visibility.cpp +++ b/test/CodeGenCXX/visibility.cpp @@ -682,3 +682,21 @@ namespace test34 { // CHECK: define weak_odr void @_ZN6test343barINS_3fooEEEvv // CHECK-HIDDEN: define weak_odr void @_ZN6test343barINS_3fooEEEvv } + +namespace test35 { + // This is a really ugly testcase. GCC propagates the DEFAULT in zed's + // definition. What we do instead is be conservative about merging + // implicit visibilities. + // FIXME: Maybe the best thing to do here is error? The test at least + // makes sure we don't produce a hidden symbol for foo<zed>::bar. + template<typename T> + struct DEFAULT foo { + void bar() {} + }; + class zed; + template class foo<zed>; + class DEFAULT zed { + }; + // CHECK: define weak_odr void @_ZN6test353fooINS_3zedEE3barEv + // CHECK-HIDDEN: define weak_odr void @_ZN6test353fooINS_3zedEE3barEv +} |