[llvm-commits] [test-suite] r109264 - /test-suite/trunk/SingleSource/UnitTests/block-call-r7674133.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Jul 23 14:01:55 PDT 2010
Author: fjahanian
Date: Fri Jul 23 16:01:54 2010
New Revision: 109264
URL: http://llvm.org/viewvc/llvm-project?rev=109264&view=rev
Log:
Block test for clang produced executable.
This is test case for radar 7674133.
Added:
test-suite/trunk/SingleSource/UnitTests/block-call-r7674133.cpp
Added: test-suite/trunk/SingleSource/UnitTests/block-call-r7674133.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/block-call-r7674133.cpp?rev=109264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/block-call-r7674133.cpp (added)
+++ test-suite/trunk/SingleSource/UnitTests/block-call-r7674133.cpp Fri Jul 23 16:01:54 2010
@@ -0,0 +1,36 @@
+#ifdef __clang__
+extern "C" void abort(void);
+
+class Test {
+public:
+ int i;
+ Test() : i(0)
+ {
+ }
+
+ ~Test()
+ {
+ i = -1;;
+ }
+
+ Test(const Test&r)
+ {
+ i = r.i;
+ }
+
+ void speak() const
+ {
+ if (i != 0)
+ abort();
+ }
+};
+#endif
+
+int main (int , char * const [])
+{
+#ifdef __clang__
+ Test t;
+ ^{ t.speak(); }();
+#endif
+ return 0;
+}
More information about the llvm-commits
mailing list