================
@@ -235,3 +235,38 @@ struct NoFixitInMacro {
     return;
   }
 };
+
+
+struct OverloadedMethods {
+  void f() {
+    this->i++;
+  }
+  void f() const {
+    ;
+  };
+
+  void g(int) {
+    this->i++;
+  }
+  void g(int) const {
+    ;
+  };
+
+  void h(int) {
+    this->i++;
+  };
+  void h(float) const {
+    // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: method 'h' can be made static
+    // CHECK-FIXES: static void h(float) {
+    ;
+  };
+
+  void j() {
+    this->i++;
+  }
+  int j() const {
+    ;
+  }
----------------
gxyd wrote:

This example currently on `main` (does Godbolt uses `main` of LLVM?) raises an 
incorrect warning: https://godbolt.org/z/eM6acb3zh , which I confirmed isn't a 
valid `-fix`.

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