summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-17 04:13:22 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-17 04:13:22 +0000
commite1ee623adabc9f2132de2cf557e8d920cc558868 (patch)
tree597879b628cc8af2c48108bfc47bb4bfd72dbce7 /clang/lib/Parse/Parser.cpp
parent9a174fb8ee5dd4c7bd61a7e619ea88223b730786 (diff)
downloadbcm5719-llvm-e1ee623adabc9f2132de2cf557e8d920cc558868.tar.gz
bcm5719-llvm-e1ee623adabc9f2132de2cf557e8d920cc558868.zip
In Parser::SkipUntil do not stop at '@' unconditionally.
Stopping at '@' was originally intended to avoid skipping an '@' at the @interface context when doing parser recovery, but we should not stop at all '@' tokens because they may be part of expressions (e.g. in @"string", @selector(), etc.), so in most cases we will want to skip them. This commit caused 'test/Parser/method-def-in-class.m' to fail for the cases where we tried to recover from unmatched angle bracket but IMO it is not a big deal to not have good recovery from such broken code and the way we did recovery would not always work anyway (e.g. if there was '@' in an expression). The case that rdar://7029784 is about still passes. llvm-svn: 146815
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index 95ce065ff76..c57711dbc6d 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -284,9 +284,6 @@ bool Parser::SkipUntil(const tok::TokenKind *Toks, unsigned NumToks,
ConsumeStringToken();
break;
- case tok::at:
- return false;
-
case tok::semi:
if (StopAtSemi)
return false;
OpenPOWER on IntegriCloud