[llvm-commits] [llvm] r46357 - /llvm/trunk/test/C++Frontend/2008-01-25-ResultIsParam.cpp
Duncan Sands
baldrick at free.fr
Fri Jan 25 09:36:44 PST 2008
Author: baldrick
Date: Fri Jan 25 11:36:44 2008
New Revision: 46357
URL: http://llvm.org/viewvc/llvm-project?rev=46357&view=rev
Log:
Test for PR1942.
Added:
llvm/trunk/test/C++Frontend/2008-01-25-ResultIsParam.cpp
Added: llvm/trunk/test/C++Frontend/2008-01-25-ResultIsParam.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2008-01-25-ResultIsParam.cpp?rev=46357&view=auto
==============================================================================
--- llvm/trunk/test/C++Frontend/2008-01-25-ResultIsParam.cpp (added)
+++ llvm/trunk/test/C++Frontend/2008-01-25-ResultIsParam.cpp Fri Jan 25 11:36:44 2008
@@ -0,0 +1,23 @@
+// RUN: %llvmgcc %s -S -o - | not grep {@_ZN3fooC1Ev.*result}
+// PR1942
+
+class foo
+{
+public:
+ int a;
+ int b;
+
+ foo(void) : a(0), b(0) {}
+
+ foo(int aa, int bb) : a(aa), b(bb) {}
+
+ const foo operator+(const foo& in) const;
+
+};
+
+const foo foo::operator+(const foo& in) const {
+ foo Out;
+ Out.a = a + in.a;
+ Out.b = b + in.b;
+ return Out;
+}
More information about the llvm-commits
mailing list