[clang-tools-extra] [clang-tidy] Add performance-substr-self-assignment check (PR #209657)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 21 02:17:32 PDT 2026


https://github.com/zwuis commented:

C++23 improves `std::string`, allowing us to provide the following fixit:

```cpp
   s = std::move(s).substr(...);
//     ^^^^^^^^^^ ^
```

See https://wg21.link/p2438r2 for the proposal.

https://github.com/llvm/llvm-project/pull/209657


More information about the cfe-commits mailing list