diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-04-20 21:33:39 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-04-20 21:33:39 +0000 |
| commit | 0151b7edb72a9d5d095bdf19a831cff28c07d3f5 (patch) | |
| tree | 9563a3b47d88b01a654f09c14f1dd2e003fb4de9 /clang/lib/Parse | |
| parent | 8bcc00b43e1ba1f76244cf72ef361c82969de307 (diff) | |
| download | bcm5719-llvm-0151b7edb72a9d5d095bdf19a831cff28c07d3f5.tar.gz bcm5719-llvm-0151b7edb72a9d5d095bdf19a831cff28c07d3f5.zip | |
fix the ?: fixit that ted added to recover properly.
llvm-svn: 101943
Diffstat (limited to 'clang/lib/Parse')
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index ee714e8e241..27696c438f0 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -335,15 +335,15 @@ Parser::ParseRHSOfBinaryExpression(OwningExprResult LHS, unsigned MinPrec) { Diag(Tok, diag::ext_gnu_conditional_expr); } - if (Tok.isNot(tok::colon)) { + if (Tok.is(tok::colon)) { + // Eat the colon. + ColonLoc = ConsumeToken(); + } else { Diag(Tok, diag::err_expected_colon) << FixItHint::CreateInsertion(Tok.getLocation(), ": "); Diag(OpToken, diag::note_matching) << "?"; - return ExprError(); + ColonLoc = Tok.getLocation(); } - - // Eat the colon. - ColonLoc = ConsumeToken(); } // Parse another leaf here for the RHS of the operator. |

