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 | 0b2bd86 | 2011-06-23 21:21:33 +0000 | [diff] [blame] | 4 | |
| 5 | #include "Common.h" |
| 6 | |
| 7 | @interface NSString : NSObject |
| 8 | +(id)string; |
| 9 | @end |
| 10 | |
| 11 | struct foo { |
| 12 | NSString *s; |
| 13 | foo(NSString *s): s(s){ |
| 14 | @autoreleasepool { |
| 15 | [NSString string]; |
| 16 | } |
| 17 | } |
Nico Weber | 9035951 | 2012-07-20 03:39:05 +0000 | [diff] [blame] | 18 | ~foo(){ } |
Argyrios Kyrtzidis | 0b2bd86 | 2011-06-23 21:21:33 +0000 | [diff] [blame] | 19 | private: |
| 20 | foo(foo const &); |
| 21 | foo &operator=(foo const &); |
| 22 | }; |
| 23 | |
| 24 | int main(){ |
| 25 | @autoreleasepool { |
| 26 | |
| 27 | foo f([NSString string]); |
| 28 | |
| 29 | } |
| 30 | return 0; |
| 31 | } |