aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/block-return-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/block-return-2.c')
-rw-r--r--test/Sema/block-return-2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/block-return-2.c b/test/Sema/block-return-2.c
new file mode 100644
index 000000000000..d389f4e4ffcc
--- /dev/null
+++ b/test/Sema/block-return-2.c
@@ -0,0 +1,5 @@
+// RUN: clang-cc -fsyntax-only %s -verify -fblocks
+
+void foo() {
+ ^ (void) __attribute__((noreturn)) { }(); // expected-error {{block declared 'noreturn' should not return}}
+}