blob: c74a83edbe35dec542384ad248a4302efdaba3f2 [file] [log] [blame]
Douglas Gregorc6898362008-11-17 20:45:14 +00001// RUN: clang -emit-llvm -triple=i686-apple-darwin8 -o %t %s
2// RUNX: clang -emit-llvm -o %t %s
Fariborz Jahanianb79e6612008-11-17 18:03:28 +00003
4#include <stdio.h>
5
Fariborz Jahanianf2878e52008-11-21 19:21:53 +00006@interface MyClass
7{
8}
9- (void)method;
10@end
11
12@implementation MyClass
13
14- (void)method
15{
16 @synchronized(self)
17 {
18 NSLog(@"sync");
19 }
20}
21
22@end
23
Fariborz Jahanianb79e6612008-11-17 18:03:28 +000024void foo(id a) {
25 @synchronized(a) {
26 printf("Swimming? No.");
27 return;
28 }
29}
30
Fariborz Jahanianf2878e52008-11-21 19:21:53 +000031
32