xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjC/blocks-5.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -fblocks -o %t %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc// rdar: // 8064140
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambuc@interface IDEWorkspaceDocument
6*f4a2713aSLionel Sambuc{
7*f4a2713aSLionel Sambuc  id _defaultEditorStateTree;
8*f4a2713aSLionel Sambuc}
9*f4a2713aSLionel Sambuc- (void)enumerateKeysAndObjectsUsingBlock:(void (^)(id key, id obj, unsigned char *stop))block ;
10*f4a2713aSLionel Sambuc@end
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambuc
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambucint foo();
15*f4a2713aSLionel Sambucextern void DVT (volatile const void * object, volatile const void * selector, const char * functionName);
16*f4a2713aSLionel Sambuc@implementation IDEWorkspaceDocument
17*f4a2713aSLionel Sambuc
18*f4a2713aSLionel Sambuc- (void)stateSavingDefaultEditorStatesForURLs {
19*f4a2713aSLionel Sambuc [_defaultEditorStateTree enumerateKeysAndObjectsUsingBlock:^(id identifier, id urlsToEditorStates, unsigned char *stop) {
20*f4a2713aSLionel Sambuc  do{
21*f4a2713aSLionel Sambucif (foo() )
22*f4a2713aSLionel Sambuc  DVT(&self,&_cmd,__PRETTY_FUNCTION__);
23*f4a2713aSLionel Sambuc
24*f4a2713aSLionel Sambuc}while(0);
25*f4a2713aSLionel Sambuc
26*f4a2713aSLionel Sambuc  do{
27*f4a2713aSLionel Sambuc       DVT(&self,&_cmd,__PRETTY_FUNCTION__);
28*f4a2713aSLionel Sambuc    }while(0);
29*f4a2713aSLionel Sambuc
30*f4a2713aSLionel Sambuc
31*f4a2713aSLionel Sambuc }];
32*f4a2713aSLionel Sambuc
33*f4a2713aSLionel Sambuc}
34*f4a2713aSLionel Sambuc
35*f4a2713aSLionel Sambuc- (void)enumerateKeysAndObjectsUsingBlock:(void (^)(id key, id obj, unsigned char *stop))block {}
36*f4a2713aSLionel Sambuc
37*f4a2713aSLionel Sambuc@end
38