summaryrefslogtreecommitdiff
path: root/clang/test/Sema/block-return-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/block-return-3.c')
-rw-r--r--clang/test/Sema/block-return-3.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Sema/block-return-3.c b/clang/test/Sema/block-return-3.c
new file mode 100644
index 0000000..cd942a7
--- /dev/null
+++ b/clang/test/Sema/block-return-3.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks
+
+void foo() {
+ ^ int (void) { }(); // expected-error {{control reaches end of non-void block}}
+}