<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 --- - NSNumber literals crash clang"
href="http://llvm.org/bugs/show_bug.cgi?id=22561">22561</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>NSNumber literals crash clang
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>1101.debian@gmail.com
</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>Created <span class=""><a href="attachment.cgi?id=13852" name="attach_13852" title="Source to reproduce">attachment 13852</a> <a href="attachment.cgi?id=13852&action=edit" title="Source to reproduce">[details]</a></span>
Source to reproduce
Clang crashes when tries to build NSNumber literal after error.
See the code below for better explanation:
@class NSNumber;
void checkNSNumberFDDiagnostic() {
id num = @1000;
}
@interface NSNumber
+ (NSNumber *)numberWithInt:(int)value;
@end
int main() {
id num = @1000;
}
Run with:
clang -cc1 -fsyntax-only nsnumber_literal_crash.m
Expected output:
nsnumber_literal_crash.m:4:14: error: NSNumber must be available to use
Objective-C literals
id num = @1000;
^
1 error generated.
Actual output:
nsnumber_literal_crash.m:4:14: error: NSNumber must be available to use
Objective-C literals
id num = @1000;
^
Stack dump:
0. Program arguments:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-cc1 -fsyntax-only nsnumber_literal_crash.m
1. nsnumber_literal_crash.m:12:19: current parser token ';'
2. nsnumber_literal_crash.m:11:12: parsing function body 'main'
3. nsnumber_literal_crash.m:11:12: in compound statement ('{}')
[1] 6072 segmentation fault clang -cc1 -fsyntax-only
nsnumber_literal_crash.m</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>