From 9eac931b5f29ca0353027bdacb2cc7fe0be9084a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 27 Mar 2009 04:18:06 +0000 Subject: 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 --- clang/lib/Parse/ParseTentative.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/Parse/ParseTentative.cpp') diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index 176529ce9c5..2cca2cdb1e1 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -405,14 +405,13 @@ Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract, if (Tok.is(tok::coloncolon) || Tok.is(tok::identifier)) TryAnnotateCXXScopeToken(); - if (Tok.is(tok::star) || Tok.is(tok::amp) || - (Tok.is(tok::caret) && getLang().Blocks) || + if (Tok.is(tok::star) || Tok.is(tok::amp) || Tok.is(tok::caret) || (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::star))) { // ptr-operator ConsumeToken(); while (Tok.is(tok::kw_const) || Tok.is(tok::kw_volatile) || - Tok.is(tok::kw_restrict) ) + Tok.is(tok::kw_restrict)) ConsumeToken(); } else { break; -- cgit v1.2.3