]> granicus.if.org Git - clang/commitdiff
reduce nesting.
authorChris Lattner <sabre@nondot.org>
Mon, 7 Dec 2009 16:33:19 +0000 (16:33 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 7 Dec 2009 16:33:19 +0000 (16:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90769 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseObjc.cpp

index cc5bc737a05c05fbfa6a2a04fea163679cf093b3..2c53847f8ed0fbc15f533dd11e2e13f7185ba720 100644 (file)
@@ -1567,12 +1567,17 @@ Parser::OwningStmtResult Parser::ParseObjCAtStatement(SourceLocation AtLoc) {
     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 @@ Parser::OwningStmtResult Parser::ParseObjCAtStatement(SourceLocation AtLoc) {
     SkipUntil(tok::semi);
     return StmtError();
   }
+  
   // Otherwise, eat the semicolon.
   ExpectAndConsume(tok::semi, diag::err_expected_semi_after_expr);
   return Actions.ActOnExprStmt(Actions.FullExpr(Res));