summaryrefslogtreecommitdiffstats
path: root/test/ARCMT/atautorelease.m.result
diff options
context:
space:
mode:
Diffstat (limited to 'test/ARCMT/atautorelease.m.result')
-rw-r--r--test/ARCMT/atautorelease.m.result46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/ARCMT/atautorelease.m.result b/test/ARCMT/atautorelease.m.result
new file mode 100644
index 0000000..ccce1bd
--- /dev/null
+++ b/test/ARCMT/atautorelease.m.result
@@ -0,0 +1,46 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
+// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
+// RUN: diff %t %s.result
+
+#include "Common.h"
+
+void NSLog(id, ...);
+
+int main (int argc, const char * argv[]) {
+
+ @autoreleasepool {
+
+ if (argc) {
+ @autoreleasepool {
+ NSLog(@"%s", "YES");
+ }
+ }
+ }
+
+ @autoreleasepool {
+ NSLog(@"%s", "YES");
+ }
+
+ return 0;
+}
+
+void f(void) {
+
+ @autoreleasepool {
+ int x = 4;
+
+ @autoreleasepool {
+ ++x;
+ }
+
+ }
+}
+
+int UIApplicationMain(int argc, char *argv[]);
+
+int main2(int argc, char *argv[]) {
+ @autoreleasepool {
+ int result = UIApplicationMain(argc, argv);
+ return result;
+ }
+}
OpenPOWER on IntegriCloud