forked from OSchip/llvm-project
[clang-tidy] Added misc-move-const-arg docs.
llvm-svn: 267587
This commit is contained in:
parent
3f9d7a217d
commit
1af58fc1e5
|
@ -61,6 +61,7 @@ Clang-Tidy Checks
|
|||
misc-macro-parentheses
|
||||
misc-macro-repeated-side-effects
|
||||
misc-misplaced-widening-cast
|
||||
misc-move-const-arg
|
||||
misc-move-constructor-init
|
||||
misc-multiple-statement-macro
|
||||
misc-new-delete-overloads
|
||||
|
@ -76,7 +77,7 @@ Clang-Tidy Checks
|
|||
misc-string-literal-with-embedded-nul
|
||||
misc-suspicious-missing-comma
|
||||
misc-suspicious-semicolon
|
||||
misc-suspicious-string-compare
|
||||
misc-suspicious-string-compare
|
||||
misc-swapped-arguments
|
||||
misc-throw-by-value-catch-by-reference
|
||||
misc-undelegated-constructor
|
||||
|
|
|
@ -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.
|
||||
}
|
Loading…
Reference in New Issue