summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/docs/clang-tidy/checks/misc-move-const-arg.rst
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy/checks/misc-move-const-arg.rst')
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/misc-move-const-arg.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-move-const-arg.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-move-const-arg.rst
index 9f46ad4499d..00f47533495 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/misc-move-const-arg.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/misc-move-const-arg.rst
@@ -5,17 +5,18 @@ misc-move-const-arg
The check warns
- - if ``std::move()`` is called with a constant argument,
- - if ``std::move()`` is called with an argument of a trivially-copyable type,
- or
- - if the result of ``std::move()`` is passed as a const reference argument.
+- if ``std::move()`` is called with a constant argument,
+
+- if ``std::move()`` is called with an argument of a trivially-copyable type,
+
+- if the result of ``std::move()`` is passed as a const reference argument.
In all three cases, the check will suggest a fix that removes the
``std::move()``.
Here are examples of each of the three cases:
-.. code:: c++
+.. code-block:: c++
const string s;
return std::move(s); // Warning: std::move of the const variable has no effect
OpenPOWER on IntegriCloud