summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/copy-constructor-elim.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-08-14 20:11:43 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-08-14 20:11:43 +0000
commit42af5ba7b702f4cd539c3a334fff290b83f25887 (patch)
tree9048ff3e84cad58cd8d225b194d0e92e71da025e /clang/test/CodeGenCXX/copy-constructor-elim.cpp
parenta6b3ce203a09da37ee7f93b8b8339af9e38fdf07 (diff)
downloadbcm5719-llvm-42af5ba7b702f4cd539c3a334fff290b83f25887.tar.gz
bcm5719-llvm-42af5ba7b702f4cd539c3a334fff290b83f25887.zip
ir-gen for generation of trvial copy constructor
call. llvm-svn: 79034
Diffstat (limited to 'clang/test/CodeGenCXX/copy-constructor-elim.cpp')
-rw-r--r--clang/test/CodeGenCXX/copy-constructor-elim.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/copy-constructor-elim.cpp b/clang/test/CodeGenCXX/copy-constructor-elim.cpp
index 5a1109d7f75..2a6be90bc6b 100644
--- a/clang/test/CodeGenCXX/copy-constructor-elim.cpp
+++ b/clang/test/CodeGenCXX/copy-constructor-elim.cpp
@@ -1,5 +1,7 @@
// RUN: clang-cc -emit-llvm -o %t %s &&
-// RUN: grep "_ZN1CC1ERK1C" %t | count 0
+// RUN: grep "_ZN1CC1ERK1C" %t | count 0 &&
+// RUN: grep "_ZN1SC1ERK1S" %t | count 0 &&
+// RUN: true
extern "C" int printf(...);
@@ -22,10 +24,21 @@ public:
}
};
+
+struct S {
+ S();
+};
+
+S::S() { printf("S()\n"); }
+
+void Call(S) {};
+
int main()
{
X a(1);
X b(a, 2);
X c = b;
X d(a, 5, 6);
+ S s;
+ Call(s);
}
OpenPOWER on IntegriCloud