[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / resolve-method-in-global-pool.m
blob523856d663f63ed4d45d7d96fa2c0c2242ad776c
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s
2 // RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s
3 // expected-no-diagnostics
5 // rdar://16808765
7 @interface NSObject 
8 + (void)clsMethod:(int*)arg;
9 @end
11 @class NSDictionary;
12 @class NSError;
14 @interface Foo : NSObject
15 - (void)getDonuts:(void (^)(NSDictionary *, NSError *))replyBlock;
16 - (void)getCake:(int*)arg, ...;
17 @end
19 @protocol Protocol
20 @required
21 - (void)getDonuts:(void (^)(NSDictionary *))replyBlock;
22 - (void)getCake:(float*)arg, ...;
23 + (void)clsMethod:(float*)arg;
24 @end
26 @implementation Foo
28   float g;
31 - (void)getDonuts:(void (^)(NSDictionary *, NSError *))replyBlock {
32     [(id) 0 getDonuts:^(NSDictionary *replyDict) { }];
35 - (void) getCake:(int*)arg, ... {
36     [(id)0 getCake: &g, 1,3.14];
38 @end
40 void func( Class c, float g ) {
41     [c clsMethod: &g];
44 // rdar://18095772
45 @protocol NSKeyedArchiverDelegate @end
47 @interface NSKeyedArchiver
48 @property (assign) id <NSKeyedArchiverDelegate> delegate;
49 @end
51 @interface NSConnection
52 @property (assign) id delegate;
53 @end
55 extern id NSApp;
57 @interface AppDelegate
58 @end
60 AppDelegate* GetDelegate()
62     return [NSApp delegate];