1.. title:: clang-tidy - readability-redundant-string-init
2
3readability-redundant-string-init
4=================================
5
6Finds unnecessary string initializations.
7
8Examples
9--------
10
11.. code-block:: c++
12
13  // Initializing string with empty string literal is unnecessary.
14  std::string a = "";
15  std::string b("");
16
17  // becomes
18
19  std::string a;
20  std::string b;
21
22Options
23-------
24
25.. option:: StringNames
26
27    Default is `::std::basic_string`.
28
29    Semicolon-delimited list of class names to apply this check to.
30    By default `::std::basic_string` applies to ``std::string`` and
31    ``std::wstring``. Set to e.g. `::std::basic_string;llvm::StringRef;QString`
32    to perform this check on custom classes.
33