r180860 - [ObjC declaration documentation] declaration of
jahanian
fjahanian at apple.com
Wed May 1 11:57:55 PDT 2013
On May 1, 2013, at 11:54 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>
> On May 1, 2013, at 11:51 , John McCall <rjmccall at apple.com> wrote:
>
>> On May 1, 2013, at 10:55 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>>> I'm not sure it's right to remove 'const'—consider global string constant declarations:
>>>
>>> extern NSString * const MyNotificationName;
>>>
>>> I think you'll have to explicitly remove ObjC lifetime attrs only.
>>
>> Why is this a problem? You think the user wants to see "cannot initialize object of type 'NSMutableString *' with expression of type 'NSString * const'"?
>>
>> As long as the value's been lvalue-to-rvalue-converted, I see no reason to report top-level qualification.
>
> Hm, point. I didn't realized this was just for rvalues. Thanks for the explanation.
Yes, but when we are providing documentation, we want to preserve the ‘const’- ness:
@interface NSMutableArray : NSArray
{
//! This is the name.
NSString *const Name;
}
//! This is initWithLabel comment.
- (NSString *)initWithLabel:(NSString * const)label;
@end
- Fariborz
>
> Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130501/66f36171/attachment.html>
More information about the cfe-commits
mailing list