aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-11-17 18:03:28 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-11-17 18:03:28 +0000
commitb79e661a84ad1494d7a045e9de8d4f2ff2167056 (patch)
tree1f68b782087a92306f26ea7d9697936fe997e407
parenta26877fb7b54ba78fc35e244a4781cf22d114ec0 (diff)
Test case for objective-c's @synchronized statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59451 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGenObjC/synchronized.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenObjC/synchronized.m b/test/CodeGenObjC/synchronized.m
new file mode 100644
index 0000000000..ee4b8cad63
--- /dev/null
+++ b/test/CodeGenObjC/synchronized.m
@@ -0,0 +1,11 @@
+// RUN: clang -emit-llvm -o %t %s
+
+#include <stdio.h>
+
+void foo(id a) {
+ @synchronized(a) {
+ printf("Swimming? No.");
+ return;
+ }
+}
+