Thanks to John McCall for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182182
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!TT)
return LI;
- const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(TT->getDecl());
- if (!RD)
- return LI;
-
- const FunctionDecl *FD = getOutermostFunctionContext(RD);
+ const Decl *D = TT->getDecl();
+ const FunctionDecl *FD = getOutermostFunctionContext(D);
if (!FD)
return LI;
void *h() { return g(); }
}
+
+namespace test8 {
+ // CHECK-DAG: define linkonce_odr void @_ZN5test81fIZNS_1gEvE1SEEvT_(
+ template <typename T> void f(T) {}
+ inline void *g() {
+ enum S {
+ };
+ return reinterpret_cast<void *>(f<S>);
+ }
+ void *h() { return g(); }
+}