aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/block-syntax-error.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/block-syntax-error.c')
-rw-r--r--test/Sema/block-syntax-error.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Sema/block-syntax-error.c b/test/Sema/block-syntax-error.c
new file mode 100644
index 0000000000..c98f1fd2aa
--- /dev/null
+++ b/test/Sema/block-syntax-error.c
@@ -0,0 +1,9 @@
+// RUN: clang %s -fsyntax-only -verify -fblocks
+
+void (^noop)(void);
+
+void somefunction() {
+ noop = ^int *{}; // expected-error {{expected expression}}
+
+ noop = ^noop; // expected-error {{expected expression}}
+}