================
@@ -235,3 +235,38 @@ struct NoFixitInMacro {
     return;
   }
 };
+
+
+struct OverloadedMethods {
+  void f() {
+    this->i++;
+  }
+  void f() const {
+    ;
----------------
gxyd wrote:

I think we do actually need the `;`, because in it's absence the function will 
be declared as having a trivial body. That would mean the matcher (under 
consideration): 
https://github.com/llvm/llvm-project/blob/d9c02ffa4d519245903ba8d168b3bafeb1a396af/clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStaticCheck.cpp#L83-L99

would never match. Hence, we'll never be actually testing the 
`hasNonConstOverload` (the utility I just added).

Let me know if you still think otherwise.

https://github.com/llvm/llvm-project/pull/191712
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to