[clang-tools-extra] [clang-tidy] Fix false positive in readability-convert-member-functions-to-static for const overloads (PR #191712)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 13 07:50:11 PDT 2026


================
@@ -449,6 +412,11 @@ Changes in existing checks
   - Reduce verbosity by removing the note indicating source location of the
     ``empty`` function.
 
+- Improved :doc:`readability-convert-member-functions-to-static
+  <clang-tidy/checks/readability/convert-member-functions-to-static>` check by
+  avoiding false positive on ``const`` member functions to static when they are
+  a part of const/non-const overload pair with same signature.
----------------
vbvictor wrote:

if it is overload, it must have same signature
```suggestion
  a part of const/non-const overload pair.
```

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


More information about the cfe-commits mailing list