[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-initialization: Enhance the check for the scenario with MemberExpr initialization. (PR #151936)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 7 07:54:12 PDT 2025
================
@@ -172,7 +172,8 @@ Changes in existing checks
- Improved :doc:`performance-unnecessary-copy-initialization
<clang-tidy/checks/performance/unnecessary-copy-initialization>` by printing
- the type of the diagnosed variable.
+ the type of the diagnosed variable and adding detection for local variables
+ initialized with a member variable of a const object.
----------------
EugeneZelenko wrote:
```suggestion
initialized with a member variable of a ``const`` object.
```
https://github.com/llvm/llvm-project/pull/151936
More information about the cfe-commits
mailing list