arguments only resolves to a single specialization, make sure to look
through using declarations. Fixes PR7641.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108376
91177308-0d34-0410-b5e6-
96231b3b80d8
// specified and it, along with any default template arguments,
// identifies a single function template specialization, then the
// template-id is an lvalue for the function template specialization.
- FunctionTemplateDecl *FunctionTemplate = cast<FunctionTemplateDecl>(*I);
+ FunctionTemplateDecl *FunctionTemplate
+ = cast<FunctionTemplateDecl>((*I)->getUnderlyingDecl());
// C++ [over.over]p2:
// If the name is a function template, template argument deduction is
return Foo<T>(b, quuz);
}
}
+
+// PR7641
+namespace PR7641 {
+ namespace N2
+ {
+ template<class>
+ int f0(int);
+ }
+ namespace N
+ {
+ using N2::f0;
+ }
+
+ template<class R,class B1>
+ int
+ f1(R(a)(B1));
+
+ void f2()
+ { f1(N::f0<int>); }
+}