aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
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 /lib/Parse/ParseDecl.cpp
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 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index a9fbbbe498..2c26b13dc1 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1682,11 +1682,10 @@ void Parser::ParseDeclaratorInternal(Declarator &D,
tok::TokenKind Kind = Tok.getKind();
// Not a pointer, C++ reference, or block.
- if (Kind != tok::star &&
+ if (Kind != tok::star && Kind != tok::caret &&
(Kind != tok::amp || !getLang().CPlusPlus) &&
// We parse rvalue refs in C++03, because otherwise the errors are scary.
- (Kind != tok::ampamp || !getLang().CPlusPlus) &&
- (Kind != tok::caret || !getLang().Blocks)) {
+ (Kind != tok::ampamp || !getLang().CPlusPlus)) {
if (DirectDeclParser)
(this->*DirectDeclParser)(D);
return;
@@ -1697,7 +1696,7 @@ void Parser::ParseDeclaratorInternal(Declarator &D,
SourceLocation Loc = ConsumeToken(); // Eat the *, ^, & or &&.
D.SetRangeEnd(Loc);
- if (Kind == tok::star || (Kind == tok::caret && getLang().Blocks)) {
+ if (Kind == tok::star || Kind == tok::caret) {
// Is a pointer.
DeclSpec DS;