[clang-tidy] fix-it for performance-inefficient-string-concatenation
Open
clang-tidy
enhancement
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
performance-inefficient-string-concatenation may benefit from having a fix-it to allow transformations like
```cpp
string1 = string1 + string2;
```
to
```cpp
string1 += string2;
```
and maybe:
```cpp
string1 = string1 + "bar" + string2;
```
to
```cpp
string1.append("bar").append(string2);
```
I don't have the full grasp on which checkers are allowed to have fix-its but this one feels straightforward and side-effect free enough that can be helpful.
https://godbolt.org/z/Wdd3o7sb9
Contributor guide
Assessment
This issue has not been assessed yet.