@@ -62,44 +62,44 @@ void ContainerContainsCheck::registerMatchers(MatchFinder *Finder) {
62
62
.bind (" positiveComparison" ),
63
63
this );
64
64
AddSimpleMatcher (
65
- binaryOperator (hasOperatorName (" !=" ), hasOperands (CountCall, Literal0))
65
+ binaryOperation (hasOperatorName (" !=" ), hasOperands (CountCall, Literal0))
66
66
.bind (" positiveComparison" ));
67
67
AddSimpleMatcher (
68
- binaryOperator (hasLHS (CountCall), hasOperatorName (" >" ), hasRHS (Literal0))
68
+ binaryOperation (hasLHS (CountCall), hasOperatorName (" >" ), hasRHS (Literal0))
69
69
.bind (" positiveComparison" ));
70
70
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))
78
72
.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" ));
79
79
80
80
// Find inverted membership tests which use `count()`.
81
81
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))
89
83
.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" ));
90
90
AddSimpleMatcher (
91
- binaryOperator (hasLHS (CountCall), hasOperatorName (" <" ), hasRHS (Literal1))
91
+ binaryOperation (hasLHS (CountCall), hasOperatorName (" <" ), hasRHS (Literal1))
92
92
.bind (" negativeComparison" ));
93
93
AddSimpleMatcher (
94
- binaryOperator (hasLHS (Literal1), hasOperatorName (" >" ), hasRHS (CountCall))
94
+ binaryOperation (hasLHS (Literal1), hasOperatorName (" >" ), hasRHS (CountCall))
95
95
.bind (" negativeComparison" ));
96
96
97
97
// Find membership tests based on `find() == end()`.
98
98
AddSimpleMatcher (
99
- binaryOperator (hasOperatorName (" !=" ), hasOperands (FindCall, EndCall))
99
+ binaryOperation (hasOperatorName (" !=" ), hasOperands (FindCall, EndCall))
100
100
.bind (" positiveComparison" ));
101
101
AddSimpleMatcher (
102
- binaryOperator (hasOperatorName (" ==" ), hasOperands (FindCall, EndCall))
102
+ binaryOperation (hasOperatorName (" ==" ), hasOperands (FindCall, EndCall))
103
103
.bind (" negativeComparison" ));
104
104
}
105
105
0 commit comments