================
@@ -541,75 +557,91 @@ std::optional<StringRef> getterVariableName(const 
CXXMethodDecl *CMD) {
 //   void foo(T arg) { FieldName = std::move(arg); }
 //   R foo(T arg) { FieldName = std::move(arg); return *this; }
 // then returns "FieldName"
-std::optional<StringRef> setterVariableName(const CXXMethodDecl *CMD) {
+// Returns the LHS expression of the assignment in a trivial setter body, or
+// nullptr if the method does not match the pattern of a trivial setter.
----------------
timon-ul wrote:

We now have 2 comments here, the old one and your new one. This is especially 
confusing since the old comment still mentions the old behaviour, as in 
returning the string `"FieldName"` which we do not return anymore. I personally 
think your comment is not clear enough, especially since it is lacking the 
information of `return *this` being an allowed case.

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

Reply via email to