John McCall | 9b0a7ce | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c++ %s.result |
| 2 | // RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c++ %s > %t |
Argyrios Kyrtzidis | 0b2bd86 | 2011-06-23 21:21:33 +0000 | [diff] [blame] | 3 | // RUN: diff %t %s.result |
Argyrios Kyrtzidis | 7e79129 | 2012-01-12 02:34:32 +0000 | [diff] [blame] | 4 | // DISABLE: mingw32 |
Argyrios Kyrtzidis | 0b2bd86 | 2011-06-23 21:21:33 +0000 | [diff] [blame] | 5 | |
| 6 | #include "Common.h" |
| 7 | |
| 8 | @interface NSString : NSObject |
| 9 | +(id)string; |
| 10 | @end |
| 11 | |
| 12 | struct foo { |
| 13 | NSString *s; |
| 14 | foo(NSString *s): s(s){ |
| 15 | @autoreleasepool { |
| 16 | [NSString string]; |
| 17 | } |
| 18 | } |
Nico Weber | 9035951 | 2012-07-20 03:39:05 +0000 | [diff] [blame^] | 19 | ~foo(){ } |
Argyrios Kyrtzidis | 0b2bd86 | 2011-06-23 21:21:33 +0000 | [diff] [blame] | 20 | private: |
| 21 | foo(foo const &); |
| 22 | foo &operator=(foo const &); |
| 23 | }; |
| 24 | |
| 25 | int main(){ |
| 26 | @autoreleasepool { |
| 27 | |
| 28 | foo f([NSString string]); |
| 29 | |
| 30 | } |
| 31 | return 0; |
| 32 | } |