[cfe-commits] r76741 - in /cfe/trunk: include/clang/AST/Type.h include/clang/Basic/DiagnosticSemaKinds.td lib/AST/ASTContext.cpp lib/AST/Type.cpp lib/Sema/SemaExprObjC.cpp lib/Sema/SemaType.cpp test/SemaObjC/call-super-2.m test/SemaObjC/protocol-archane.m test/SemaObjC/protocol-attribute.m test/SemaObjC/protocol-qualified-class-unsupported.m

Fariborz Jahanian fjahanian at apple.com
Wed Jul 22 11:48:35 PDT 2009


On Jul 22, 2009, at 11:23 AM, steve naroff wrote:

>
> On Jul 22, 2009, at 2:06 PM, Fariborz Jahanian wrote:
>
>> Looks good, with a question below;
>> - Fariborz
>>
>> On Jul 22, 2009, at 9:07 AM, Steve Naroff wrote:
>>
>>> --- cfe/trunk/test/SemaObjC/call-super-2.m (original)
>>> +++ cfe/trunk/test/SemaObjC/call-super-2.m Wed Jul 22 11:07:01 2009
>>> @@ -40,8 +40,8 @@
>>> {
>>>  int i = [(id <Func>)self class_func0];
>>>  i += [(id <Func>)super class_func0];    // expected-error  
>>> {{cannot cast 'super' (it isn't an expression)}}
>>> -   i += [(Class <Func>)self class_func0];  // expected-error  
>>> {{protocol qualified 'Class' is unsupported}}
>>> -   return i + [(Class <Func>)super class_func0]; // expected- 
>>> error {{protocol qualified 'Class' is unsupported}} // expected- 
>>> error {{cannot cast 'super' (it isn't an expression)}}
>>> +   i += [(Class <Func>)self class_func0];  //
>>> +   return i + [(Class <Func>)super class_func0]; // // expected- 
>>> error {{cannot cast 'super' (it isn't an expression)}}
>>
>> For what is worth, gcc does not issue this error.
>
> We consciously "outlawed" casting 'super' quite some time ago  
> (though we went back and forth several times).
>>
>
>
> Ultimately, Chris pushed for making it an error (I believe this was  
> the right decision, since we haven't heard too many screams:-)
>
> I can probably dig up the email/commits with the rationale if you'd  
> like...

Thanks. No need to. It came back to me.

- Fariborz

>
>
> snaroff
>
>> - Fariborz
>>
>>
>>>
>




More information about the cfe-commits mailing list