File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -222,8 +222,6 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) {
222222 if (FindExpr->getNumArgs () == 0 )
223223 return ;
224224
225- const bool Neg = isNegativeComparison (ComparisonExpr);
226-
227225 // Retrieve the source text of the search expression.
228226 const auto SearchExprText = Lexer::getSourceText (
229227 CharSourceRange::getTokenRange (SearchExpr->getSourceRange ()),
@@ -247,7 +245,7 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) {
247245 (SearchExprText + " )" ).str ());
248246
249247 // Add negation if necessary.
250- if (Neg )
248+ if (isNegativeComparison (ComparisonExpr) )
251249 Diagnostic << FixItHint::CreateInsertion (FindExpr->getBeginLoc (), " !" );
252250}
253251
You can’t perform that action at this time.
0 commit comments