blob: 9c4a159364f4cfc859bd71b95d20c87079a36246 [file] [log] [blame]
Fariborz Jahanian862d7352012-02-24 00:29:20 +00001// RUN: %clang_cc1 -E %s -o %t.m
John McCall260611a2012-06-20 06:18:46 +00002// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -rewrite-objc %t.m -o - | FileCheck %s
Argyrios Kyrtzidis9335df32012-02-12 04:48:45 +00003
4@interface I {
5 id _delegate;
6}
7-(void)foo;
8@end
9
10@implementation I
11
12static void KKKK(int w);
13
14-(void) foo {
15 KKKK(0);
16}
17
18static void KKKK(int w) {
19 I *self = (I *)0;
20 if ([self->_delegate respondsToSelector:@selector(handlePortMessage:)]) {
21 }
22}
23
24-(void) foo2 {
25 KKKK(0);
26}
27
28@end
29
30// CHECK: if (((id (*)(id, SEL, ...))(void *)objc_msgSend)((id)((struct I_IMPL *)self)->_delegate, sel_registerName("respondsToSelector:"), sel_registerName("handlePortMessage:")))