[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
Sat Apr 18 06:13:01 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:

I meant the second one.
Speaking about the first, "overload" usually when function have same name and different parameters, like `g(int), g(int, int)` but if we are speaking about const/non-const pair then all parameters should be the same already.

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


More information about the cfe-commits mailing list