1 // RUN: %clang_cc1 %s -verify -fsyntax-only -fobjc-runtime=ios
12 id _someivar; // expected-note {{here}}
16 // Spell-checking 'undefined' is ok.
17 undefined var; // expected-error {{unknown type name}}
21 -(void)foo:(id)p1 other:(id)p2 {
22 // Spell-checking 'super' is not ok.
28 [self foo:[super description] other:someivar]; // expected-error {{use of undeclared identifier 'someivar'; did you mean '_someivar'?}}
32 __attribute__ (( __objc_root_class__ ))
34 id _interface; // expected-note {{'_interface' declared here}}
40 id _extension; // expected-note {{'_extension' declared here}}
45 id _implementation; // expected-note {{'_implementation' declared here}}
48 (void)self->implementation; // expected-error {{'I' does not have a member named 'implementation'; did you mean '_implementation'?}}
49 (void)self->interface; // expected-error {{'I' does not have a member named 'interface'; did you mean '_interface'?}}
50 (void)self->extension; // expected-error {{'I' does not have a member named 'extension'; did you mean '_extension'?}}
54 // Typo correction for a property when it has as correction candidates
55 // synthesized ivar and a class name, both at the same edit distance.
58 __attribute__ (( __objc_root_class__ ))
59 @interface PropertyType
63 __attribute__ (( __objc_root_class__ ))
65 @property(assign) PropertyType *typoCandidate; // expected-note {{'_typoCandidate' declared here}}
68 @implementation InterfaceC
70 typoCandidate.x = 0; // expected-error {{use of undeclared identifier 'typoCandidate'; did you mean '_typoCandidate'?}}