diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-27 04:18:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-27 04:18:06 +0000 |
commit | 9eac931b5f29ca0353027bdacb2cc7fe0be9084a (patch) | |
tree | 85e7ea1ed1e5e294d10b76c03cac945191895385 /clang/test/Sema/exprs.c | |
parent | 87a801af59e778387d6565aae4d8ed9d29831170 (diff) | |
download | bcm5719-llvm-9eac931b5f29ca0353027bdacb2cc7fe0be9084a.tar.gz bcm5719-llvm-9eac931b5f29ca0353027bdacb2cc7fe0be9084a.zip |
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.
llvm-svn: 67816
Diffstat (limited to 'clang/test/Sema/exprs.c')
-rw-r--r-- | clang/test/Sema/exprs.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/test/Sema/exprs.c b/clang/test/Sema/exprs.c index d348d9e190d..80334078f1f 100644 --- a/clang/test/Sema/exprs.c +++ b/clang/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}} +} |