summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-string-concatenation.rst
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2016-08-26 17:46:51 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2016-08-26 17:46:51 +0000
commit8e8fa788214642200b0524a930122d40285e573f (patch)
tree678c2e6bf2f47a0f5f8013f7e0d63eb3bc54f12c /clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-string-concatenation.rst
parentbc1701c7fb91f28096ae4f11629516f05d6c0bc4 (diff)
downloadbcm5719-llvm-8e8fa788214642200b0524a930122d40285e573f.tar.gz
bcm5719-llvm-8e8fa788214642200b0524a930122d40285e573f.zip
[Clang-tidy] Fix some checks documentation style.
Differential revision: https://reviews.llvm.org/D23894 llvm-svn: 279846
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-string-concatenation.rst')
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-string-concatenation.rst16
1 files changed, 9 insertions, 7 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-string-concatenation.rst b/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-string-concatenation.rst
index a9169dac8f6..562cbee927d 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-string-concatenation.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-string-concatenation.rst
@@ -3,16 +3,18 @@
performance-inefficient-string-concatenation
============================================
-This check warns about the performance overhead arising from concatenating strings using the ``operator+``, for instance:
+This check warns about the performance overhead arising from concatenating
+strings using the ``operator+``, for instance:
-.. code:: c++
+.. code-block:: c++
std::string a("Foo"), b("Bar");
a = a + b;
-Instead of this structure you should use ``operator+=`` or ``std::string``'s (``std::basic_string``) class member function ``append()``. For instance:
+Instead of this structure you should use ``operator+=`` or ``std::string``'s
+(``std::basic_string``) class member function ``append()``. For instance:
-.. code:: c++
+.. code-block:: c++
std::string a("Foo"), b("Baz");
for (int i = 0; i < 20000; ++i) {
@@ -21,7 +23,7 @@ Instead of this structure you should use ``operator+=`` or ``std::string``'s (``
Could be rewritten in a greatly more efficient way like:
-.. code:: c++
+.. code-block:: c++
std::string a("Foo"), b("Baz");
for (int i = 0; i < 20000; ++i) {
@@ -30,7 +32,7 @@ Could be rewritten in a greatly more efficient way like:
And this can be rewritten too:
-.. code:: c++
+.. code-block:: c++
void f(const std::string&) {}
std::string a("Foo"), b("Baz");
@@ -40,7 +42,7 @@ And this can be rewritten too:
In a slightly more efficient way like:
-.. code:: c++
+.. code-block:: c++
void f(const std::string&) {}
std::string a("Foo"), b("Baz");
OpenPOWER on IntegriCloud