Add a testcase from pr16059.

It was fixed back in r182750, but this is a nice testcase to have.

llvm-svn: 182818
This commit is contained in:
Rafael Espindola 2013-05-29 03:10:01 +00:00
parent c4fe5db111
commit 7dcb52eed7
1 changed files with 14 additions and 0 deletions

View 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(); }
}