aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-15 07:58:29 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-15 07:58:29 +0000
commit02d65ee373feb1cb029185aa0de04d0c214eda3d (patch)
tree7ecde5f19cecc5e4e2c8748bb54ba4cbc0a5af5a /test
parenta121eb3af061a9402aa88630a0eb535d92962e2c (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/SemaCXX/cxx0x-initializer-references.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-references.cpp b/test/SemaCXX/cxx0x-initializer-references.cpp
index c4e9c907a3..283c32ac2e 100644
--- a/test/SemaCXX/cxx0x-initializer-references.cpp
+++ b/test/SemaCXX/cxx0x-initializer-references.cpp
@@ -90,3 +90,10 @@ namespace PR12660 {
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> });
+}