Author: alexfh Date: Tue Apr 26 13:48:59 2016 New Revision: 267587 URL: http://llvm.org/viewvc/llvm-project?rev=267587&view=rev Log: [clang-tidy] Added misc-move-const-arg docs.
Added: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-move-const-arg.rst Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst?rev=267587&r1=267586&r2=267587&view=diff ============================================================================== --- clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst (original) +++ clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst Tue Apr 26 13:48:59 2016 @@ -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 Added: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-move-const-arg.rst URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-move-const-arg.rst?rev=267587&view=auto ============================================================================== --- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-move-const-arg.rst (added) +++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-move-const-arg.rst Tue Apr 26 13:48:59 2016 @@ -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. + } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits