Author: alexfh Date: Fri Jan 23 08:43:06 2015 New Revision: 226911 URL: http://llvm.org/viewvc/llvm-project?rev=226911&view=rev Log: [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! Modified: clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmpty.cpp Modified: clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmpty.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmpty.cpp?rev=226911&r1=226910&r2=226911&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmpty.cpp (original) +++ clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmpty.cpp Fri Jan 23 08:43:06 2015 @@ -68,8 +68,7 @@ void ContainerSizeEmptyCheck::registerMa 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()), _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
