Skip to content

Commit 3a03a28

Browse files
fubowenflovent
authored andcommitted
improve test cases based on reviewd feedback
1 parent 55076a2 commit 3a03a28

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

clang-tools-extra/test/clang-tidy/checkers/readability/convert-member-functions-to-static-deducing-this.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ namespace std{
55
void println(const char *format, const std::string &str) {}
66
}
77

8-
namespace PR141381 {
98
struct Hello {
109
std::string str_;
1110

12-
void hello(this Hello &self) { std::println("Hello, {0}!", self.str_); }
11+
void ByValueSelf(this Hello self) { std::println("Hello, {0}!", self.str_); }
12+
13+
void ByLRefSelf(this Hello &self) { std::println("Hello, {0}!", self.str_); }
14+
15+
void ByRRefSelf(this Hello&& self) {}
16+
17+
template<typename Self> void ByForwardRefSelf(this Self&& self) {}
18+
19+
void MultiParam(this Hello &self, int a, double b) {}
20+
21+
void UnnamedExplicitObjectParam(this Hello &) {}
1322
};
14-
}

0 commit comments

Comments
 (0)