summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/reference-bind-default-argument.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-19 00:20:10 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-19 00:20:10 +0000
commit27a9b72bf1e4fe9f1d3ee9a5db1b9d614b0ee01c (patch)
tree6bd21607afc9f6f7dfb9253c2fa2d20a9bdb91fe /test/CodeGenCXX/reference-bind-default-argument.cpp
parente12e77bed10f87bdc7305d0dbd1de89e48f280c1 (diff)
Fix for PR5524: make reference binding in default argument work correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/reference-bind-default-argument.cpp')
-rw-r--r--test/CodeGenCXX/reference-bind-default-argument.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGenCXX/reference-bind-default-argument.cpp b/test/CodeGenCXX/reference-bind-default-argument.cpp
new file mode 100644
index 0000000000..acce962b19
--- /dev/null
+++ b/test/CodeGenCXX/reference-bind-default-argument.cpp
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 %s -emit-llvm-only -verify
+
+struct A {};
+struct B : A {};
+void a(const A& x = B());
+void b() { a(); }