[cfe-commits] r171268 - /cfe/trunk/lib/Parse/ParseStmt.cpp
Nico Weber
nicolasweber at gmx.de
Sun Dec 30 15:36:57 PST 2012
Author: nico
Date: Sun Dec 30 17:36:56 2012
New Revision: 171268
URL: http://llvm.org/viewvc/llvm-project?rev=171268&view=rev
Log:
Simplify. No functionality change.
Modified:
cfe/trunk/lib/Parse/ParseStmt.cpp
Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=171268&r1=171267&r2=171268&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Sun Dec 30 17:36:56 2012
@@ -867,15 +867,10 @@
SourceLocation CloseLoc = Tok.getLocation();
// We broke out of the while loop because we found a '}' or EOF.
- if (Tok.isNot(tok::r_brace)) {
- Diag(Tok, diag::err_expected_rbrace);
- Diag(T.getOpenLocation(), diag::note_matching) << "{";
+ if (!T.consumeClose())
// Recover by creating a compound statement with what we parsed so far,
// instead of dropping everything and returning StmtError();
- } else {
- if (!T.consumeClose())
- CloseLoc = T.getCloseLocation();
- }
+ CloseLoc = T.getCloseLocation();
return Actions.ActOnCompoundStmt(T.getOpenLocation(), CloseLoc,
Stmts, isStmtExpr);
More information about the cfe-commits
mailing list