xref: /minix3/external/bsd/llvm/dist/clang/test/Rewriter/func-in-impl.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -E %s -o %t.m
2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -rewrite-objc %t.m -o - | FileCheck %s
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc@interface I {
5*f4a2713aSLionel Sambuc  id _delegate;
6*f4a2713aSLionel Sambuc}
7*f4a2713aSLionel Sambuc-(void)foo;
8*f4a2713aSLionel Sambuc@end
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc@implementation I
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambucstatic void KKKK(int w);
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambuc-(void) foo {
15*f4a2713aSLionel Sambuc  KKKK(0);
16*f4a2713aSLionel Sambuc}
17*f4a2713aSLionel Sambuc
18*f4a2713aSLionel Sambucstatic void KKKK(int w) {
19*f4a2713aSLionel Sambuc  I *self = (I *)0;
20*f4a2713aSLionel Sambuc  if ([self->_delegate respondsToSelector:@selector(handlePortMessage:)]) {
21*f4a2713aSLionel Sambuc  }
22*f4a2713aSLionel Sambuc}
23*f4a2713aSLionel Sambuc
24*f4a2713aSLionel Sambuc-(void) foo2 {
25*f4a2713aSLionel Sambuc  KKKK(0);
26*f4a2713aSLionel Sambuc}
27*f4a2713aSLionel Sambuc
28*f4a2713aSLionel Sambuc@end
29*f4a2713aSLionel Sambuc
30*f4a2713aSLionel Sambuc// CHECK: if (((id (*)(id, SEL, ...))(void *)objc_msgSend)((id)((struct I_IMPL *)self)->_delegate, sel_registerName("respondsToSelector:"), sel_registerName("handlePortMessage:")))
31