diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-04-18 19:37:43 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-04-18 19:37:43 +0000 |
commit | 0ac0ee9be071c796b0f05392b473234b884c0ae8 (patch) | |
tree | 71445da2d8d908436b995502a94469c8e410e11f /lib/Parse | |
parent | d333e7be00bd8bceac0989d7877589d85ceae7da (diff) |
Objective-C parsing [qoi]: Provide good recovery when
Objective-C dictionary literals has bad syntax for the
separator. // rdar://10679157
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index ad95dd5821..4adba4f5c5 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -2747,7 +2747,9 @@ ExprResult Parser::ParseObjCDictionaryLiteral(SourceLocation AtLoc) { if (Tok.is(tok::colon)) { ConsumeToken(); } else { - return ExprError(Diag(Tok, diag::err_expected_colon)); + Diag(Tok, diag::err_expected_colon); + SkipUntil(tok::r_brace); + return ExprError(); } ExprResult ValueExpr(ParseAssignmentExpression()); |