Index: lib/Edit/RewriteObjCFoundationAPI.cpp =================================================================== --- lib/Edit/RewriteObjCFoundationAPI.cpp +++ lib/Edit/RewriteObjCFoundationAPI.cpp @@ -628,10 +628,7 @@ if (!getNSArrayObjects(Msg->getArg(1), NS, Keys)) return false; - if (Vals.size() != Keys.size()) - return false; - - return true; + return Vals.size() == Keys.size(); } return false; @@ -888,53 +885,30 @@ // make it broadly available. static bool subscriptOperatorNeedsParens(const Expr *FullExpr) { const Expr* Expr = FullExpr->IgnoreImpCasts(); - if (isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(FullExpr) || - isa(Expr) || - isa(Expr)) - return false; - - return true; + return !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(FullExpr) && + !isa(Expr) && !isa(Expr); } + static bool castOperatorNeedsParens(const Expr *FullExpr) { const Expr* Expr = FullExpr->IgnoreImpCasts(); - if (isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(Expr) || - isa(FullExpr) || - isa(Expr) || - isa(Expr) || - isa(Expr)) - return false; - - return true; + return !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr) && !isa(FullExpr) && + !isa(Expr) && !isa(Expr) && + !isa(Expr); } static void objectifyExpr(const Expr *E, Commit &commit) {