llvm-project/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-strin...

20 lines
362 B
ReStructuredText

.. title:: clang-tidy - readability-redundant-string-init
readability-redundant-string-init
=================================
Finds unnecessary string initializations.
Examples:
.. code-block:: c++
// Initializing string with empty string literal is unnecessary.
std::string a = "";
std::string b("");
// becomes
std::string a;
std::string b;