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 | 9af5500f3f132f9a2f9abbe82113a7c7bb751472 (patch) | |
tree | 262b83444877ee284c509b5faa4507df10170370 /lib/Parse/ParseTentative.cpp | |
parent | 6fa9c38744b2332acf9f5a72658fa213f93158de (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 'lib/Parse/ParseTentative.cpp')
-rw-r--r-- | lib/Parse/ParseTentative.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index 176529ce9c..2cca2cdb1e 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/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; |