1 // RUN: %clang_cc1 -triple i386-apple-darwin8 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-constraints=range -analyzer-store=region -verify %s
3 // <rdar://problem/6888289> - This test case shows that a nil instance
4 // variable can possibly be initialized by a method.
5 typedef struct RDar6888289_data {
13 - (RDar6888289_data) test;
14 - (RDar6888289_data) test2;
16 - (RDar6888289_data) getData;
19 @implementation RDar6888289
20 - (RDar6888289_data) test {
25 - (RDar6888289_data) test2 {
27 return [x getData]; // expected-warning{{The receiver of message 'getData' is nil and returns a value of type 'RDar6888289_data' that will be garbage}}
34 - (RDar6888289_data) getData {
35 return (RDar6888289_data) { 0 };