diff options
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.rst | 15 |
1 files changed, 15 insertions, 0 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 new file mode 100644 index 00000000000..b09e0a1cf23 --- /dev/null +++ b/clang-tools-extra/docs/clang-tidy/checks/misc-move-const-arg.rst @@ -0,0 +1,15 @@ +.. title:: clang-tidy - misc-move-const-arg + +misc-move-const-arg +=================== + +The check warns if the result of ``std::move(x)`` is bound to a constant +reference argument, e.g.: + +.. code:: c++ + + void f(const string&); + void g() { + string s; + F(std::move(s)); // Warning here. std::move() is not moving anything. + } |