diff options
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst')
-rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst b/clang-tools-extra/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst index 7a5cdf4193e..280e7c046f4 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst @@ -1,21 +1,12 @@ +:orphan: + .. title:: clang-tidy - performance-implicit-cast-in-loop +.. meta:: + :http-equiv=refresh: 5;URL=performance-implicit-conversion-in-loop.html performance-implicit-cast-in-loop ================================= -This warning appears in a range-based loop with a loop variable of const ref -type where the type of the variable does not match the one returned by the -iterator. This means that an implicit cast has been added, which can for example -result in expensive deep copies. - -Example: - -.. code-block:: c++ - - map<int, vector<string>> my_map; - for (const pair<int, vector<string>>& p : my_map) {} - // The iterator type is in fact pair<const int, vector<string>>, which means - // that the compiler added a cast, resulting in a copy of the vectors. +This check has been renamed to `performance-implicit-conversion-in-loop +<performance-implicit-conversion-in-loop.html>`_. -The easiest solution is usually to use ``const auto&`` instead of writing the type -manually. |