[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 5 07:48:09 PDT 2024
================
@@ -483,6 +483,12 @@ Changes in existing checks
usages of ``std::string_view::compare``. Added a `StringLikeClasses` option
to detect usages of ``compare`` method in custom string-like classes.
+- Improved :doc:`unnecessary-value-param
+ <clang-tidy/checks/performance/unnecessary-value-param>` check
+ detecting more cases for template functions including lambdas with `auto`.
+ E.g., `std::sort(a.begin(), a.end(), [](auto x, auto y) { return a > b; });`
----------------
EugeneZelenko wrote:
```suggestion
E.g., ``std::sort(a.begin(), a.end(), [](auto x, auto y) { return a > b; });``
```
https://github.com/llvm/llvm-project/pull/97767
More information about the cfe-commits
mailing list