Patrick Beard | b2f6820 | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Fariborz Jahanian | 140ab23 | 2011-08-31 17:37:55 +0000 | [diff] [blame] | 3 | // rdar://8843851 |
| 4 | |
| 5 | int* global; |
| 6 | |
| 7 | @interface I |
| 8 | - (void) Meth; |
| 9 | @property int prop; |
| 10 | @property int prop1; |
| 11 | @end |
| 12 | |
| 13 | @implementation I |
| 14 | + (void) _defaultMinSize { }; |
| 15 | static void _initCommon() { |
| 16 | Class graphicClass; |
| 17 | [graphicClass _defaultMinSize]; |
| 18 | } |
| 19 | |
| 20 | - (void) Meth { [self Forw]; } // No warning now |
| 21 | - (void) Forw {} |
| 22 | - (int) func { return prop; } // compiles - synthesized ivar will be accessible here. |
| 23 | - (int)get_g { return global; } // No warning here - synthesized ivar will be accessible here. |
| 24 | @synthesize prop; |
| 25 | @synthesize prop1=global; |
| 26 | @end |