summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/linkage2.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-05-30 21:23:15 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-05-30 21:23:15 +0000
commit503276be05be067a707bc7004ef3596a620072f2 (patch)
tree8bb3858a3f4893bbd9965eefaa393d57c474d8b1 /clang/test/SemaCXX/linkage2.cpp
parent4a01e59354deb1c2a40109262747dbaa34140c55 (diff)
downloadbcm5719-llvm-503276be05be067a707bc7004ef3596a620072f2.tar.gz
bcm5719-llvm-503276be05be067a707bc7004ef3596a620072f2.zip
Fix PR16060.
The testcase in PR16060 points out that while template arguments can show that a type is not externally visible, the standards still says they have external linkage. In terms of our implementation, it means that we should merge just the isExternallyVisible bit, not the formal linkage. llvm-svn: 182962
Diffstat (limited to 'clang/test/SemaCXX/linkage2.cpp')
-rw-r--r--clang/test/SemaCXX/linkage2.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/linkage2.cpp b/clang/test/SemaCXX/linkage2.cpp
index ed6e9677d5a..a811575c612 100644
--- a/clang/test/SemaCXX/linkage2.cpp
+++ b/clang/test/SemaCXX/linkage2.cpp
@@ -186,3 +186,18 @@ namespace test17 {
g();
}
}
+
+namespace test18 {
+ template <typename T> struct foo {
+ template <T *P> static void f() {}
+ static void *g() { return (void *)f<&x>; }
+ static T x;
+ };
+ template <typename T> T foo<T>::x;
+ inline void *f() {
+ struct S {
+ };
+ return foo<S>::g();
+ }
+ void *h() { return f(); }
+}
OpenPOWER on IntegriCloud