r183713 - Objective-C [qoi]: Issue better warning when nsstring literal is missing

jahanian fjahanian at apple.com
Tue Jun 11 08:32:31 PDT 2013


On Jun 10, 2013, at 5:21 PM, Jordan Rose <jordan_rose at apple.com> wrote:

> 
> On Jun 10, 2013, at 17:12 , Arthur O'Dwyer <arthur.j.odwyer at gmail.com> wrote:
> 
>> On Mon, Jun 10, 2013 at 4:51 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
>>> 
>>> +def warn_missing_atsign_prefix : Warning<
>>> +  "string literal must be prefixed by '@' ">, InGroup<ObjCLiteralMissingAtSign>;
>> 
>> Shouldn't this say "NSString literal", not "string literal"?
>> Objective-C has the same
>> string literals as C and C++, and they don't need to be prefixed by
>> '@'. I feel like
>> overriding the term "string literal" in this message to refer
>> specifically to NSString
>> literals is actually more confusing than it is helpful.
> 
> I thought about this in looking at the patch, but it doesn't match with similar diagnostics about "array literals" and "dictionary literals". Moreover, it's not actually guaranteed that the constant string class is called "NSString".
> 
> If we wanted this, we could either look up the string class name, or refer to "Objective-C string literal”.

Changing to “Objective-C string literal” is fine with me.
- Fariborz

> 
> Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130611/e81a3d32/attachment.html>


More information about the cfe-commits mailing list