Ted Kremenek | cdc3a89 | 2012-08-24 20:39:55 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -analyzer-constraints=range -Wno-objc-root-class %s -verify |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Ted Kremenek | b6b81d1 | 2008-10-17 17:24:14 +0000 | [diff] [blame] | 3 | |
| 4 | // The point of this test cases is to exercise properties in the static |
| 5 | // analyzer |
| 6 | |
| 7 | @interface MyClass { |
| 8 | @private |
| 9 | id _X; |
| 10 | } |
| 11 | - (id)initWithY:(id)Y; |
Fariborz Jahanian | 6669db9 | 2008-11-25 17:56:43 +0000 | [diff] [blame] | 12 | @property(copy, readwrite) id X; |
Ted Kremenek | b6b81d1 | 2008-10-17 17:24:14 +0000 | [diff] [blame] | 13 | @end |
| 14 | |
| 15 | @implementation MyClass |
| 16 | @synthesize X = _X; |
| 17 | - (id)initWithY:(id)Y { |
| 18 | self.X = Y; |
| 19 | return self; |
| 20 | } |
| 21 | @end |