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

Gaurav Dhingra via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 21 05:49:23 PDT 2026


================
@@ -235,3 +235,24 @@ struct NoFixitInMacro {
     return;
   }
 };
+
+
+struct OverloadedMethods {
+  void f() { this->i++; }
+  void f() const { ; };   // `;` is necessary to ensure non trivial body
----------------
gxyd wrote:

Yes, I've more tests in the latest commit(s), that should make the tests more robust.

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


More information about the cfe-commits mailing list