resolving an overloaded function reference within an initializer list.
Previously we would try to resolve the overloaded function reference without
first stripping off the InitListExpr wrapper.
llvm-svn: 172517
Sequence.RewrapReferenceInitList(cv1T1, InitList);
return;
}
+
+ // Update the initializer if we've resolved an overloaded function.
+ if (Sequence.step_begin() != Sequence.step_end())
+ Sequence.RewrapReferenceInitList(cv1T1, InitList);
}
// Not reference-related. Create a temporary and bind to that.
const int &i { 1 };
struct S { S(int); } const &s { 2 };
}
+
+namespace b7891773 {
+ typedef void (*ptr)();
+ template <class T> void f();
+ int g(const ptr &);
+ int k = g({ f<int> });
+}