================
@@ -0,0 +1,14 @@
+// RUN: %check_clang_tidy -std=c++23 %s 
readability-convert-member-functions-to-static %t
+
+namespace std{
+  class string {};
+  void println(const char *format, const std::string &str) {}
+}
+
+namespace PR141381 {
+struct Hello {
+  std::string str_;
+
+  void hello(this Hello &self) { std::println("Hello, {0}!", self.str_); }
----------------
vbvictor wrote:

Please add tests:
- with some are other parameters.
- unnamed object parameter (see p.5 of 
https://en.cppreference.com/w/cpp/language/function#Parameter_list)
- with `this Hello self`, `this Hello&& self`, `template<typename Self> void 
hello(this Self&& self);`

https://github.com/llvm/llvm-project/pull/141391
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to