DimitrijeDobrota wrote:

> LGTM. It looks similar as #138757. could you add a test for both PR.

I have the issue where I want to test the `custom_move` and I need check to 
pass only for `-check-suffix=,MOVEFUNCTION` and fail for everything else, since 
it still expects `::std::move`. I am not sure how to write this. Apart from 
this, I've managed to add necessary checks for the existing set of test cases.

```c++
void move_with_custom(Obj&& o) {
  // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: rvalue reference parameter 'o' 
is never moved from inside the function body 
[cppcoreguidelines-rvalue-reference-param-not-moved]
  // CHECK-MESSAGES-MOVEFUNCTION: no error in this case

  Obj other{custom_move(o)};
```

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

Reply via email to