Don't crash when binding a reference to a temporary pointer created from
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172517 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/cxx0x-initializer-references.cpp b/test/SemaCXX/cxx0x-initializer-references.cpp
index c4e9c90..283c32a 100644
--- a/test/SemaCXX/cxx0x-initializer-references.cpp
+++ b/test/SemaCXX/cxx0x-initializer-references.cpp
@@ -90,3 +90,10 @@
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> });
+}