instantiated function template was written with a prototype or via
some kind of typedef. Fixes PR10273 / <rdar://problem/
9723679>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134426
91177308-0d34-0410-b5e6-
96231b3b80d8
Function->setLexicalDeclContext(LexicalDC);
// Attach the parameters
- if (isa<FunctionProtoType>(Function->getType())) {
+ if (isa<FunctionProtoType>(Function->getType().IgnoreParens())) {
// Adopt the already-instantiated parameters into our own context.
for (unsigned P = 0; P < Params.size(); ++P)
if (Params[P])
int n = f<int>();
}
+
+namespace PR10273 {
+ template<typename T> void (f)(T t) {}
+
+ void g() {
+ (f)(17);
+ }
+}