================ @@ -97,6 +97,13 @@ Improvements to clang-tidy New checks ^^^^^^^^^^ +- New :doc:`performance-substr-self-assignment + <clang-tidy/checks/performance/substr-self-assignment>` check. + + Finds cases where a string variable is assigned the result of calling + ``substr()`` on itself, which creates an unnecessary temporary. Suggests + using ``erase()`` to modify the string in-place instead. ---------------- EugeneZelenko wrote:
```suggestion ``substr()`` on itself. ``` https://github.com/llvm/llvm-project/pull/209657 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
