diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-17 04:13:22 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-17 04:13:22 +0000 |
commit | 0db9f4dad563a335641f5b9d4a42504d638b6c85 (patch) | |
tree | 3f1519a515d7fa94be46a58e2bbceb49f0b99a49 /lib/Parse/Parser.cpp | |
parent | a24195aaf71cee202f92ea4bad50358f3d0b701f (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index 95ce065ff7..c57711dbc6 100644 --- a/lib/Parse/Parser.cpp +++ b/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; |