aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/exprs.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-27 04:18:06 +0000
committerChris Lattner <sabre@nondot.org>2009-03-27 04:18:06 +0000
commit9af5500f3f132f9a2f9abbe82113a7c7bb751472 (patch)
tree262b83444877ee284c509b5faa4507df10170370 /test/Sema/exprs.c
parent6fa9c38744b2332acf9f5a72658fa213f93158de (diff)
Fix rdar://6719156 - clang should emit a better error when blocks are disabled but are used anyway
by changing blocks from being disabled in the parser to being disabled in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67816 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/exprs.c')
-rw-r--r--test/Sema/exprs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index d348d9e190..80334078f1 100644
--- a/test/Sema/exprs.c
+++ b/test/Sema/exprs.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -verify -pedantic -fsyntax-only
+// RUN: clang-cc %s -verify -pedantic -fsyntax-only -fno-blocks
// PR1966
_Complex double test1() {
@@ -85,3 +85,9 @@ int test12(const char *X) {
return X == "foo"; // expected-warning {{comparison against a string literal is unspecified}}
}
+// rdar://6719156
+void test13(
+ void (^P)()) { // expected-error {{blocks support disabled - compile with -fblocks}}
+ P();
+ P = ^(){}; // expected-error {{blocks support disabled - compile with -fblocks}}
+}