<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang should give a better diagnostic for forgetting the @ in front of an NSString"
href="http://llvm.org/bugs/show_bug.cgi?id=16287">16287</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang should give a better diagnostic for forgetting the @ in front of an NSString
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicolasweber@gmx.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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"`.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>