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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs