[LLVMbugs] [Bug 16287] New: clang should give a better diagnostic for forgetting the @ in front of an NSString
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jun 9 13:40:59 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16287
Bug ID: 16287
Summary: clang should give a better diagnostic for forgetting
the @ in front of an NSString
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Currently:
Nicos-MacBook-Pro:src thakis$ cat test.mm
#import <Cocoa/Cocoa.h>
@interface A
- (void)doFoo:(NSString*)s;
@end
void f(A* a) {
[a doFoo:"asdf"];
}
Nicos-MacBook-Pro:src thakis$ ~/src/llvm/Release+Asserts/bin/clang -c test.mm
test.mm:8:12: error: cannot initialize a parameter of type 'NSString *' with an
lvalue of type 'const char [5]'
[a doFoo:"asdf"];
^~~~~~
test.mm:4:26: note: passing argument to parameter 's' here
- (void)doFoo:(NSString*)s;
^
1 error generated.
Instead it should just say `missing '@' in front of "asdf"`.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130609/48ba052a/attachment.html>
More information about the llvm-bugs
mailing list