xref: /minix3/external/bsd/llvm/dist/clang/test/Rewriter/crash.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s
2*f4a2713aSLionel Sambuc// rdar://5950938
3*f4a2713aSLionel Sambuc@interface NSArray {}
4*f4a2713aSLionel Sambuc+ (id)arrayWithObjects:(id)firstObj, ...;
5*f4a2713aSLionel Sambuc@end
6*f4a2713aSLionel Sambuc
7*f4a2713aSLionel Sambuc@interface NSConstantString {}
8*f4a2713aSLionel Sambuc@end
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambucint main() {
11*f4a2713aSLionel Sambuc    id foo = [NSArray arrayWithObjects:@"1", @"2", @"3", @"4", @"5", @"6", @"7", @"8", @"9", @"10", @"11", @"12", 0];
12*f4a2713aSLionel Sambuc    return 0;
13*f4a2713aSLionel Sambuc}
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambuc// rdar://6291588
16*f4a2713aSLionel Sambuc@protocol A
17*f4a2713aSLionel Sambuc@end
18*f4a2713aSLionel Sambuc
19*f4a2713aSLionel Sambuc@interface Foo
20*f4a2713aSLionel Sambuc@end
21*f4a2713aSLionel Sambuc
22*f4a2713aSLionel Sambucvoid func() {
23*f4a2713aSLionel Sambuc  id <A> obj = (id <A>)[Foo bar];
24*f4a2713aSLionel Sambuc}
25*f4a2713aSLionel Sambuc
26