aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/elide-call-reference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/elide-call-reference.cpp')
-rw-r--r--test/CodeGenCXX/elide-call-reference.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenCXX/elide-call-reference.cpp b/test/CodeGenCXX/elide-call-reference.cpp
new file mode 100644
index 000000000000..863e69c9cc02
--- /dev/null
+++ b/test/CodeGenCXX/elide-call-reference.cpp
@@ -0,0 +1,11 @@
+// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s
+// PR5695
+
+struct A { A(const A&); ~A(); };
+A& a();
+void b() {
+ A x = a();
+}
+
+// CHECK: call void @_ZN1AC1ERKS_
+// CHECK: call void @_ZN1AD1Ev