Home | History | Annotate | Download | only in Rewriter
      1 // RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5  %s -o -
      2 
      3 id SYNCH_EXPR();
      4 void SYNCH_BODY();
      5 void  SYNCH_BEFORE();
      6 void  SYNC_AFTER();
      7 
      8 void foo(id sem)
      9 {
     10   SYNCH_BEFORE();
     11   @synchronized (SYNCH_EXPR()) { 
     12     SYNCH_BODY();
     13     return;
     14   }
     15  SYNC_AFTER();
     16  @synchronized ([sem self]) {
     17     SYNCH_BODY();
     18     return;
     19  }
     20 }
     21