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
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp
index 176529c..2cca2cd 100644
--- a/lib/Parse/ParseTentative.cpp
+++ b/lib/Parse/ParseTentative.cpp
@@ -405,14 +405,13 @@
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;