Fariborz Jahanian | adcfab1 | 2009-12-16 23:13:33 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | typedef const void * VoidStar; |
| 4 | |
| 5 | typedef struct __CFDictionary * CFMDRef; |
| 6 | |
| 7 | void RandomFunc(CFMDRef theDict, const void *key, const void *value); |
| 8 | |
| 9 | @interface Foo |
| 10 | - (void)_apply:(void (*)(const void *, const void *, void *))func context:(void *)context; |
| 11 | - (void)a:(id *)objects b:(id *)keys; |
| 12 | @end |
| 13 | |
| 14 | @implementation Foo |
| 15 | - (void)_apply:(void (*)(const void *, const void *, void *))func context:(void *)context { |
| 16 | id item; |
| 17 | id obj; |
| 18 | func(item, obj, context); |
| 19 | } |
| 20 | |
| 21 | - (void)a:(id *)objects b:(id *)keys { |
| 22 | VoidStar dict; |
| 23 | id key; |
| 24 | RandomFunc((CFMDRef)dict, key, objects[3]); |
| 25 | } |
| 26 | @end |