@@ -62,44 +62,44 @@ void ContainerContainsCheck::registerMatchers(MatchFinder *Finder) {
6262 .bind (" positiveComparison" ),
6363 this );
6464 AddSimpleMatcher (
65- binaryOperator (hasOperatorName (" !=" ), hasOperands (CountCall, Literal0))
65+ binaryOperation (hasOperatorName (" !=" ), hasOperands (CountCall, Literal0))
6666 .bind (" positiveComparison" ));
6767 AddSimpleMatcher (
68- binaryOperator (hasLHS (CountCall), hasOperatorName (" >" ), hasRHS (Literal0))
68+ binaryOperation (hasLHS (CountCall), hasOperatorName (" >" ), hasRHS (Literal0))
6969 .bind (" positiveComparison" ));
7070 AddSimpleMatcher (
71- binaryOperator (hasLHS (Literal0), hasOperatorName (" <" ), hasRHS (CountCall))
72- .bind (" positiveComparison" ));
73- AddSimpleMatcher (
74- binaryOperator (hasLHS (CountCall), hasOperatorName (" >=" ), hasRHS (Literal1))
75- .bind (" positiveComparison" ));
76- AddSimpleMatcher (
77- binaryOperator (hasLHS (Literal1), hasOperatorName (" <=" ), hasRHS (CountCall))
71+ binaryOperation (hasLHS (Literal0), hasOperatorName (" <" ), hasRHS (CountCall))
7872 .bind (" positiveComparison" ));
73+ AddSimpleMatcher (binaryOperation (hasLHS (CountCall), hasOperatorName (" >=" ),
74+ hasRHS (Literal1))
75+ .bind (" positiveComparison" ));
76+ AddSimpleMatcher (binaryOperation (hasLHS (Literal1), hasOperatorName (" <=" ),
77+ hasRHS (CountCall))
78+ .bind (" positiveComparison" ));
7979
8080 // Find inverted membership tests which use `count()`.
8181 AddSimpleMatcher (
82- binaryOperator (hasOperatorName (" ==" ), hasOperands (CountCall, Literal0))
83- .bind (" negativeComparison" ));
84- AddSimpleMatcher (
85- binaryOperator (hasLHS (CountCall), hasOperatorName (" <=" ), hasRHS (Literal0))
86- .bind (" negativeComparison" ));
87- AddSimpleMatcher (
88- binaryOperator (hasLHS (Literal0), hasOperatorName (" >=" ), hasRHS (CountCall))
82+ binaryOperation (hasOperatorName (" ==" ), hasOperands (CountCall, Literal0))
8983 .bind (" negativeComparison" ));
84+ AddSimpleMatcher (binaryOperation (hasLHS (CountCall), hasOperatorName (" <=" ),
85+ hasRHS (Literal0))
86+ .bind (" negativeComparison" ));
87+ AddSimpleMatcher (binaryOperation (hasLHS (Literal0), hasOperatorName (" >=" ),
88+ hasRHS (CountCall))
89+ .bind (" negativeComparison" ));
9090 AddSimpleMatcher (
91- binaryOperator (hasLHS (CountCall), hasOperatorName (" <" ), hasRHS (Literal1))
91+ binaryOperation (hasLHS (CountCall), hasOperatorName (" <" ), hasRHS (Literal1))
9292 .bind (" negativeComparison" ));
9393 AddSimpleMatcher (
94- binaryOperator (hasLHS (Literal1), hasOperatorName (" >" ), hasRHS (CountCall))
94+ binaryOperation (hasLHS (Literal1), hasOperatorName (" >" ), hasRHS (CountCall))
9595 .bind (" negativeComparison" ));
9696
9797 // Find membership tests based on `find() == end()`.
9898 AddSimpleMatcher (
99- binaryOperator (hasOperatorName (" !=" ), hasOperands (FindCall, EndCall))
99+ binaryOperation (hasOperatorName (" !=" ), hasOperands (FindCall, EndCall))
100100 .bind (" positiveComparison" ));
101101 AddSimpleMatcher (
102- binaryOperator (hasOperatorName (" ==" ), hasOperands (FindCall, EndCall))
102+ binaryOperation (hasOperatorName (" ==" ), hasOperands (FindCall, EndCall))
103103 .bind (" negativeComparison" ));
104104}
105105
0 commit comments