blob: b07460dbec44a2214283ae2463f7628c41aed32b [file] [log] [blame]
John McCall1e5bc4f2012-03-08 22:00:17 +00001// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -fblocks -verify %s
2
3// rdar://problem/10982793
4// [p foo] in ARC creates a cleanup.
5// The plus is invalid and causes the cleanup to go unbound.
6// Don't crash.
7@interface A
8- (id) foo;
9@end
10void takeBlock(void (^)(void));
11void test0(id p) {
12 takeBlock(^{ [p foo] + p; }); // expected-error {{invalid operands to binary expression}}
13}