ccotter marked an inline comment as done.
ccotter added a comment.

Rebased as well on top of the latest release notes



================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved.cpp:45
+template <typename T>
+void never_moves_param_template(Obj&& o, T t) {
+  // CHECK-MESSAGES: :[[@LINE-1]]:33: warning: rvalue reference parameter is 
never moved from inside the function body 
[cppcoreguidelines-rvalue-reference-param-not-moved]
----------------
carlosgalvezp wrote:
> Could we add something like this too?
> 
> ```
> template <typename T>
> struct Foo
> {
>   void never_moves(T&& t) {}
> };
> ```
> 
> Here `t` is not a universal reference so the check should warn.
Done in the `AClassTemplate::never_moves` test.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141569/new/

https://reviews.llvm.org/D141569

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to