r194938 - ObjectiveC ARC. More validation of toll-free bridging of
jahanian
fjahanian at apple.com
Mon Nov 18 17:47:44 PST 2013
On Nov 18, 2013, at 4:15 PM, jahanian <fjahanian at apple.com> wrote:
>
> On Nov 18, 2013, at 4:13 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
>>
>> On Nov 16, 2013, at 3:22 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
>>
>>>
>
>>> -void Test2(CFErrorRef2 cf, NSError *ns, NSString *str) {
>>> +void Test2(CFErrorRef2 cf, NSError *ns, NSString *str, Class c) {
>>> (void)(NSString *)cf; // expected-warning {{CFErrorRef bridges to NSError, not NSString}}
>>> (void)(NSError *)cf; // okay
>>> (void)(MyError*)cf; // okay,
>>> (void)(CFErrorRef)ns; // okay
>>> (void)(CFErrorRef)str; // expected-warning {{NSString cannot bridge to CFErrorRef}}
>>> + (void)(Class)cf; // expected-warning {{CFErrorRef bridges to NSError, not 'Class'}}
>>> + (void)(CFErrorRef)c; // expected-warning {{'Class' cannot bridge to 'CFErrorRef’}}
>>
>> ‘Class’ behaves like ‘id’, doesn’t it? Shouldn’t these be accepted without a warning?
>
> Ok. Just that I wasn’t sure and I wanted to be on the cautious side.
Jordan, raised a question. So, I wait.
- Fariborz
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list