================
@@ -240,6 +240,9 @@ void UseStartsEndsWithCheck::check(const 
MatchFinder::MatchResult &Result) {
                                        ReplacementFunction->getName());
 
   // Replace arguments and everything after the function call.
+  if (FindExpr->getNumArgs() == 0) {
+    return;
+  }
----------------
5chmidti wrote:

Technically all matchers that bind `find_expr` do bind on a call with more than 
one argument, but we can leave this in. IMO this should be moved before any 
fixes are added to the diagnostic, otherwise there will be a partial fix 
attached to the diagnostic. 

nit: single expr as *then* -> no braces around the return

https://github.com/llvm/llvm-project/pull/116033
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to