[cfe-commits] r90769 - /cfe/trunk/lib/Parse/ParseObjc.cpp

Chris Lattner sabre at nondot.org
Mon Dec 7 08:33:19 PST 2009


Author: lattner
Date: Mon Dec  7 10:33:19 2009
New Revision: 90769

URL: http://llvm.org/viewvc/llvm-project?rev=90769&view=rev
Log:
reduce nesting.

Modified:
    cfe/trunk/lib/Parse/ParseObjc.cpp

Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=90769&r1=90768&r2=90769&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Mon Dec  7 10:33:19 2009
@@ -1567,12 +1567,17 @@
     Actions.CodeCompleteObjCAtStatement(CurScope);
     ConsumeToken();
     return StmtError();
-  } else if (Tok.isObjCAtKeyword(tok::objc_try)) {
+  }
+  
+  if (Tok.isObjCAtKeyword(tok::objc_try))
     return ParseObjCTryStmt(AtLoc);
-  } else if (Tok.isObjCAtKeyword(tok::objc_throw))
+  
+  if (Tok.isObjCAtKeyword(tok::objc_throw))
     return ParseObjCThrowStmt(AtLoc);
-  else if (Tok.isObjCAtKeyword(tok::objc_synchronized))
+  
+  if (Tok.isObjCAtKeyword(tok::objc_synchronized))
     return ParseObjCSynchronizedStmt(AtLoc);
+  
   OwningExprResult Res(ParseExpressionWithLeadingAt(AtLoc));
   if (Res.isInvalid()) {
     // If the expression is invalid, skip ahead to the next semicolon. Not
@@ -1581,6 +1586,7 @@
     SkipUntil(tok::semi);
     return StmtError();
   }
+  
   // Otherwise, eat the semicolon.
   ExpectAndConsume(tok::semi, diag::err_expected_semi_after_expr);
   return Actions.ActOnExprStmt(Actions.FullExpr(Res));





More information about the cfe-commits mailing list