[LLVMbugs] [Bug 22561] New: NSNumber literals crash clang
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Feb 12 01:00:01 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22561
Bug ID: 22561
Summary: NSNumber literals crash clang
Product: clang
Version: 3.5
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: 1101.debian at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13852
--> http://llvm.org/bugs/attachment.cgi?id=13852&action=edit
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
--
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/20150212/d1fd67cc/attachment.html>
More information about the llvm-bugs
mailing list