[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 14 02:28:47 PDT 2023


================
@@ -333,3 +333,22 @@ void instantiate_a_class_template() {
   AClassTemplate<Obj&> withObjRef(o);
   withObjRef.never_moves(o);
 }
+
+namespace gh68209
+{
+  void f1([[maybe_unused]] int&& x) {}
+
+  void f2(__attribute__((unused)) int&& x) {}
----------------
PiotrZSL wrote:

Add info to documentation, that params with such attributes are unused.

https://github.com/llvm/llvm-project/pull/69045


More information about the cfe-commits mailing list