add some block goto test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69460 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/block-misc.c b/test/Sema/block-misc.c
index ea3477d..277d6d2 100644
--- a/test/Sema/block-misc.c
+++ b/test/Sema/block-misc.c
@@ -78,7 +78,21 @@
}
// radr://6732116 - block comparisons
-void (^g)();
-int foo(void (^p)()) {
- return g == p;
+void (^test7a)();
+int test7(void (^p)()) {
+ return test7a == p;
}
+
+
+void test8() {
+somelabel:
+ // FIXME: This should say "jump out of block not legal" when gotos are allowed.
+ ^{ goto somelabel; }(); // expected-error {{goto not allowed in block literal}}
+}
+
+void test9() {
+ goto somelabel; // expected-error {{use of undeclared label 'somelabel'}}
+ ^{ somelabel: ; }();
+}
+
+