[llvm-commits] [test-suite] r104965 - /test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-3.m
Fariborz Jahanian
fjahanian at apple.com
Fri May 28 10:35:04 PDT 2010
Author: fjahanian
Date: Fri May 28 12:35:04 2010
New Revision: 104965
URL: http://llvm.org/viewvc/llvm-project?rev=104965&view=rev
Log:
Test for radar 8037512.
Added:
test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-3.m
Added: test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-3.m
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-3.m?rev=104965&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-3.m (added)
+++ test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-3.m Fri May 28 12:35:04 2010
@@ -0,0 +1,45 @@
+#include <Foundation/Foundation.h>
+// rdar: // 8037512
+
+int main()
+{
+ int state = 0;
+ [NSAutoreleasePool new];
+
+ @try {
+ state++;
+ @try {
+ state++;
+ @throw [NSObject new];
+ }
+ @catch (...) {
+ state--;
+ @throw;
+ }
+ }
+
+ @catch (...) {
+ state--;
+ }
+
+ if (state)
+ abort();
+
+ @try {
+ state++;
+ @try {
+ state++;
+ @throw [NSObject new];
+ }
+ @catch (id e) {
+ state--;
+ @throw;
+ }
+ }
+ @catch (id e) {
+ state--;
+ }
+ if (state)
+ abort();
+ return 0;
+}
More information about the llvm-commits
mailing list