carlosgalvezp added inline comments.
================
Comment at:
clang-tools-extra/clang-tidy/cppcoreguidelines/RvalueReferenceParamNotMovedCheck.cpp:88
+
+ if (!Param) {
+ return;
----------------
Nit: the style convention in LLVM is to not use braces with one-line `if/else`.
================
Comment at:
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved.cpp:52
+void never_moves_params(Obj&& o1, Obj&& o2) {
+ // CHECK-MESSAGES: :[[@LINE-1]]:31: warning: rvalue reference parameter is
never moved from inside the function body
[cppcoreguidelines-rvalue-reference-param-not-moved]
+ // CHECK-MESSAGES: :[[@LINE-2]]:41: warning: rvalue reference parameter is
never moved from inside the function body
[cppcoreguidelines-rvalue-reference-param-not-moved]
----------------
It would be good for the check to specify which parameter it's referring to,
for example:
```
rvalue reference paramter 'o1' is never moved...
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141569/new/
https://reviews.llvm.org/D141569
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits