• Home
  • Raw
  • Download

Lines Matching +full:end +full:- +full:to +full:- +full:end

1 // RUN: %clang_cc1  -triple x86_64-apple-darwin11 -fsyntax-only -verify %s -Wno-objc-root-class
4 // to be explicitly implemented in the adopting class.
7 - (void) theBestOfTimes; // expected-note {{method 'theBestOfTimes' declared here}}
8 @property (readonly) id theWorstOfTimes; // expected-note {{property declared here}}
9 @end
15 - (void) theBestOfTimes;
16 @property (readonly) id theWorstOfTimes; // expected-note {{property declared here}}
17 @end
21 @end
23 …implementation ClassB // expected-warning {{property 'theWorstOfTimes' requires method 'theWorstOf…
24 @end
27 @end
29 @implementation ClassB_Good // no-warning
30 - (void) theBestOfTimes {}
32 @end
35 @property (readonly) id theWorstOfTimes; // expected-warning {{auto property synthesis will not syn…
36 @end
43 @implementation ClassB_AlsoGood // expected-note {{detected while default synthesizing properties …
44 - (void) theBestOfTimes {}
45 @end
49 - (void) fairIsFoul;
50 @end
54 - (void) foulIsFair; // expected-note {{method 'foulIsFair' declared here}}
55 @end
58 @end
61 @end
63 @implementation ClassD // expected-warning {{method 'foulIsFair' in protocol 'Derived' not implemen…
64 @end
67 __attribute__((objc_protocol_requires_explicit_implementation(1+2))) // expected-error {{attribute …
68 @protocol AnotherProtocol @end
70 // Cannot put the attribute on classes or other non-protocol declarations.
71 …rotocol_requires_explicit_implementation)) // expected-error {{attribute only applies to Objective
72 @interface AnotherClass @end
74 …rotocol_requires_explicit_implementation)) // expected-error {{attribute only applies to Objective
82 - (void)rlyeh; // expected-note 2 {{method 'rlyeh' declared here}}
83 - (void)innsmouth; // expected-note 2 {{method 'innsmouth' declared here}}
84 @end
88 - (void)dunwich;
89 - (void)innsmouth; // expected-note {{method 'innsmouth' declared here}}
90 @end
95 - (void)dunwich;
96 - (void)innsmouth; // expected-note 2 {{method 'innsmouth' declared here}}
97 @end
101 - (void)rlyeh;
102 - (void)innsmouth;
103 - (void)dunwich;
104 @end
106 @interface MyObject <ProtocolC> @end
110 @interface Lovecraft <ProtocolA> @end
111 @interface Lovecraft_2 @end
113 // Provide two variants of a subclass that conform to ProtocolB. One
114 // subclasses from a class that conforms to ProtocolA, the other that
117 // From those, provide two variants that conformat to ProtocolB_Explicit
119 @interface Shoggoth : Lovecraft <ProtocolB> @end
120 @interface Shoggoth_2 : Lovecraft_2 <ProtocolB> @end
121 @interface Shoggoth_Explicit : Lovecraft <ProtocolB_Explicit> @end
122 @interface Shoggoth_2_Explicit : Lovecraft_2 <ProtocolB_Explicit> @end
125 - (void)innsmouth {}
126 - (void)rlyeh {}
127 - (void)dunwich {}
128 @end
131 - (void)innsmouth {}
132 - (void)rlyeh {}
133 @end
136 - (void)dunwich {}
137 @end
139 @implementation Shoggoth_2 // expected-warning {{method 'innsmouth' in protocol 'ProtocolB' not imp…
140 … // expected-warning {{method 'rlyeh' in protocol 'ProtocolA' not implemented}}\
141 … // expected-warning {{'innsmouth' in protocol 'ProtocolA' not implemented}}
142 - (void)dunwich {}
143 @end
145 @implementation Shoggoth_Explicit // expected-warning {{method 'innsmouth' in protocol 'ProtocolB_E…
146 - (void)dunwich {}
147 @end
149 @implementation Shoggoth_2_Explicit // expected-warning {{method 'innsmouth' in protocol 'ProtocolB…
150 … // expected-warning {{method 'rlyeh' in protocol 'ProtocolA' not implemented}}\
151 … // expected-warning {{method 'innsmouth' in protocol 'ProtocolA' not implemented}}
152 - (void)dunwich {}
153 @end
155 // Categories adopting a protocol with explicit conformance need to implement that protocol.
157 - (void) theBestOfTimes;
159 @end
162 @end
165 @end
167 @implementation Derived (MyCat) // expected-warning {{method 'theBestOfTimes' in protocol 'Protocol…
168 @end
170 …it_implementation)) // expected-error{{attribute 'objc_protocol_requires_explicit_implementation'…
176 - (void)methodA;
177 @end
181 - (void)methodB;
182 @end
186 - (void)methodA; // expected-note {{method 'methodA' declared here}}
187 @end
191 - (void)methodB;
192 - (void)methodA;
193 @end
196 @end
198 - (void)methodB {}
199 - (void)methodA {}
200 @end
203 @end
205 @implementation Ex2ClassB // expected-warning {{method 'methodA' in protocol 'Ex2ProtocolB' not imp…
206 @end