Rewriting of @synchronized. This has one FIXME in it. But this should allow @sychronized to be rewritten.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46533 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/objc-synchronized-1.m b/test/Sema/objc-synchronized-1.m
new file mode 100644
index 0000000..cb65fc4
--- /dev/null
+++ b/test/Sema/objc-synchronized-1.m
@@ -0,0 +1,16 @@
+// RUN: clang -rewrite-test %s | clang
+
+id SYNCH_EXPR();
+void SYNCH_BODY();
+void SYNCH_BEFORE();
+void SYNC_AFTER();
+
+void foo(id sem)
+{
+ SYNCH_BEFORE();
+ @synchronized (SYNCH_EXPR()) {
+ SYNCH_BODY();
+ return;
+ }
+ SYNC_AFTER();
+}