]> granicus.if.org Git - clang/commitdiff
Test case for objective-c's @synchronized statement.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 17 Nov 2008 18:03:28 +0000 (18:03 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 17 Nov 2008 18:03:28 +0000 (18:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59451 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenObjC/synchronized.m [new file with mode: 0644]

diff --git a/test/CodeGenObjC/synchronized.m b/test/CodeGenObjC/synchronized.m
new file mode 100644 (file)
index 0000000..ee4b8ca
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: clang -emit-llvm -o %t %s
+
+#include <stdio.h>
+
+void foo(id a) {
+  @synchronized(a) {
+    printf("Swimming? No.");
+    return;
+  }
+}
+