diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-06 09:26:33 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-06 09:26:33 +0000 |
commit | eddf1213e2ae7c163870108da5b088c0039af3ce (patch) | |
tree | dc19942e918cc138606843c9552df7281a74d0e3 /clang/test | |
parent | 58ecb2ab518fcaf9dc8842d41ca77ed435911b63 (diff) | |
download | bcm5719-llvm-eddf1213e2ae7c163870108da5b088c0039af3ce.tar.gz bcm5719-llvm-eddf1213e2ae7c163870108da5b088c0039af3ce.zip |
Fix a slight oversight in computing whether a copy constructor is elidable.
Fixes PR5695.
llvm-svn: 90702
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGenCXX/elide-call-reference.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/elide-call-reference.cpp b/clang/test/CodeGenCXX/elide-call-reference.cpp new file mode 100644 index 00000000000..863e69c9cc0 --- /dev/null +++ b/clang/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 |