From: Piotr Padlewski Date: Fri, 3 Mar 2017 17:16:11 +0000 (+0000) Subject: [clang-tidy] Yet another docs fixes X-Git-Tag: llvmorg-5.0.0-rc1~10950 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6e1aa58fd226c1c1e87c8f8ca4f133503afa0a2;p=platform%2Fupstream%2Fllvm.git [clang-tidy] Yet another docs fixes llvm-svn: 296888 --- diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-emplace.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-emplace.rst index 3420bf2..e6beddd 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-emplace.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-emplace.rst @@ -69,7 +69,7 @@ exception safe. In this case the calls of ``push_back`` won't be replaced. This is because replacing it with ``emplace_back`` could cause a leak of this pointer if ``emplace_back`` would throw exception before emplacement (e.g. not -enough memory to add new element). +enough memory to add a new element). For more info read item 42 - "Consider emplacement instead of insertion." of Scott Meyers "Effective Modern C++". @@ -79,14 +79,15 @@ The default smart pointers that are considered are ``std::unique_ptr``, other classes use the :option:`SmartPointers` option. -Check also fires if any argument of constructor call would be: +Check also doesn't fire if any argument of the constructor call would be: - - bitfield (bitfields can't bind to rvalue/universal reference) + - a bit-field (bit-fields can't bind to rvalue/universal reference) - - ``new`` expression (to avoid leak) or if the argument would be converted via - derived-to-base cast. + - a ``new`` expression (to avoid leak) -This check requires C++11 of higher to run. + - if the argument would be converted via derived-to-base cast. + +This check requires C++11 or higher to run. Options -------