summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/misc-string-constructor.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-string-constructor.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-string-constructor.rst
index a5d2c884458..a4f39202823 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/misc-string-constructor.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/misc-string-constructor.rst
@@ -11,7 +11,7 @@ Examples:
.. code-block:: c++
- std::string('x', 50) str; // should be std::string(50, 'x')
+ std::string str('x', 50); // should be str(50, 'x')
Calling the string-literal constructor with a length bigger than the literal is
suspicious and adds extra random characters to the string.
OpenPOWER on IntegriCloud