std::string OverloadId = (Id + "-overload").str();
const auto RelationalExpr = ignoringParenImpCasts(binaryOperator(
- matchers::isComparisonOperator(), expr().bind(Id),
+ isComparisonOperator(), expr().bind(Id),
anyOf(allOf(hasLHS(matchSymbolicExpr(Id)),
hasRHS(matchIntegerConstantExpr(Id))),
allOf(hasLHS(matchIntegerConstantExpr(Id)),
const auto SymRight = matchSymbolicExpr("rhs");
// Match expressions like: x <op> 0xFF == 0xF00.
- Finder->addMatcher(binaryOperator(matchers::isComparisonOperator(),
+ Finder->addMatcher(binaryOperator(isComparisonOperator(),
hasEitherOperand(BinOpCstLeft),
hasEitherOperand(CstRight))
.bind("binop-const-compare-to-const"),
// Match expressions like: x <op> 0xFF == x.
Finder->addMatcher(
- binaryOperator(matchers::isComparisonOperator(),
+ binaryOperator(isComparisonOperator(),
anyOf(allOf(hasLHS(BinOpCstLeft), hasRHS(SymRight)),
allOf(hasLHS(SymRight), hasRHS(BinOpCstLeft))))
.bind("binop-const-compare-to-sym"),
this);
// Match expressions like: x <op> 10 == x <op> 12.
- Finder->addMatcher(binaryOperator(matchers::isComparisonOperator(),
+ Finder->addMatcher(binaryOperator(isComparisonOperator(),
hasLHS(BinOpCstLeft), hasRHS(BinOpCstRight),
// Already reported as redundant.
unless(operandsAreEquivalent()))