[clang-tools-extra] [clang-tidy] An option for conditional skipping overloaded functions … (PR #194133)

Zinovy Nis via cfe-commits cfe-commits at lists.llvm.org
Mon May 4 23:14:43 PDT 2026


================
@@ -42,6 +42,10 @@ class UseStringViewCheck : public ClangTidyCheck {
   StringRef U32StringViewClass = "std::u32string_view";
 
   const std::vector<StringRef> IgnoredFunctions;
+  // If true, the check will also consider overloaded functions for
+  // string_view conversion suggestions. When false (default), overloaded
+  // functions are skipped to avoid potential issues with ambiguous conversions.
----------------
irishrover wrote:

> This seems AI-implemented with no human in the loop which violates https://llvm.org/docs/AIToolPolicy.html.
> 
> This error should be easily spottable by a person who implemented the check with options already, and there are no comments for other options here

No, this PR is not AI-generated at all. It's too trivial to pay for tokens: a bool option introduced + few existing tests were moved from the common file to a dedicated one. Moreover, Ai would not forget to update docs.

The first name of this option was `IgnoreOverloadedFunctions` and I found it's unclear: `ignore` means `do not fix them at all` or `no matter it's overloaded fix it`? So I left a comment for me. Then I found a better name. But the comment still remains.



https://github.com/llvm/llvm-project/pull/194133


More information about the cfe-commits mailing list