From: Alexander Kornienko Date: Fri, 23 Jan 2015 14:43:06 +0000 (+0000) Subject: [clang-tidy] Small readability-container-size-empty cleanup X-Git-Tag: llvmorg-3.7.0-rc1~14235 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6354cae566699786f3755d684504e14518811e7;p=platform%2Fupstream%2Fllvm.git [clang-tidy] Small readability-container-size-empty cleanup Utilized the hasEitherOperand instead of explicit anyOf. http://reviews.llvm.org/D7142 Patch by Gábor Horváth! llvm-svn: 226911 --- diff --git a/clang-tools-extra/clang-tidy/readability/ContainerSizeEmpty.cpp b/clang-tools-extra/clang-tidy/readability/ContainerSizeEmpty.cpp index 407da55aee04..b7c1534fed76 100644 --- a/clang-tools-extra/clang-tidy/readability/ContainerSizeEmpty.cpp +++ b/clang-tools-extra/clang-tidy/readability/ContainerSizeEmpty.cpp @@ -68,8 +68,7 @@ void ContainerSizeEmptyCheck::registerMatchers(MatchFinder *Finder) { anyOf(has(integerLiteral(equals(0))), allOf(anyOf(hasOperatorName("<"), hasOperatorName(">="), hasOperatorName(">"), hasOperatorName("<=")), - anyOf(hasRHS(integerLiteral(equals(1))), - hasLHS(integerLiteral(equals(1))))))) + hasEitherOperand(integerLiteral(equals(1)))))) .bind("SizeBinaryOp")), hasParent(implicitCastExpr( hasImplicitDestinationType(isBoolType()),