]> granicus.if.org Git - clang/commitdiff
Add a testcase from pr16059.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 29 May 2013 03:10:01 +0000 (03:10 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 29 May 2013 03:10:01 +0000 (03:10 +0000)
It was fixed back in r182750, but this is a nice testcase to have.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182818 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/linkage.cpp

index a481b00123b5d73a35bb538c17d1e57e507ea1b6..7f6188f45724d1315059eed9b0ac69a1575124db 100644 (file)
@@ -170,3 +170,17 @@ namespace test13 {
   }
   void *zed() { return foo(); }
 }
+
+namespace test14 {
+  // CHECK-DAG: define linkonce_odr void @_ZN6test143fooIZNS_1fEvE1S_8E3barILPS1_0EEEvv(
+  template <typename T> struct foo {
+    template <T *P> static void bar() {}
+    static void *g() { return (void *)bar<nullptr>; }
+  };
+  inline void *f() {
+    struct S {
+    };
+    return foo<S>::g();
+  }
+  void h() { f(); }
+}