Fariborz Jahanian | 112c330 | 2011-01-04 20:05:20 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -S -g %s -o %t |
Devang Patel | 58faf20 | 2010-10-22 17:11:50 +0000 | [diff] [blame] | 2 | // RUN: grep "\[InstanceVariablesEverywhereButTheInterface someString\]" %t | count 6 |
Fariborz Jahanian | 1a4c937 | 2010-10-18 17:51:06 +0000 | [diff] [blame] | 3 | |
| 4 | //rdar: //8498026 |
| 5 | |
| 6 | @class NSString; |
| 7 | |
| 8 | @interface InstanceVariablesEverywhereButTheInterface |
| 9 | @end |
| 10 | |
| 11 | @interface InstanceVariablesEverywhereButTheInterface() |
| 12 | { |
| 13 | NSString *_someString; |
| 14 | } |
| 15 | |
| 16 | @property(readonly) NSString *someString; |
| 17 | @property(readonly) unsigned long someNumber; |
| 18 | @end |
| 19 | |
| 20 | @implementation InstanceVariablesEverywhereButTheInterface |
| 21 | { |
| 22 | unsigned long _someNumber; |
| 23 | } |
| 24 | |
| 25 | @synthesize someString = _someString, someNumber = _someNumber; |
| 26 | |
| 27 | - init { |
| 28 | return self; |
| 29 | } |
| 30 | @end |
| 31 | |
| 32 | @interface AutomaticSynthesis |
| 33 | { |
| 34 | int real_ivar; |
| 35 | } |
| 36 | @property(copy) NSString *someString; |
| 37 | @property unsigned long someNumber; |
| 38 | @end |
| 39 | |
| 40 | @implementation AutomaticSynthesis |
| 41 | - init |
| 42 | { |
| 43 | return self; |
| 44 | } |
| 45 | @end |
| 46 | |
| 47 | int main() |
| 48 | { |
| 49 | return 0; |
| 50 | } |