This yields better recall as ExprMutationAnalyzer is more accurate.
One common pattern this check is now able to catch is:
void foo(std::vector<X> v) { for (const auto& elm : v) { // ... } }
Paths
| Differential D50102
[clang-tidy] Use ExprMutationAnalyzer in performance-unnecessary-value-param ClosedPublic Authored by shuaiwang on Jul 31 2018, 2:07 PM.
Details Summary This yields better recall as ExprMutationAnalyzer is more accurate. One common pattern this check is now able to catch is: void foo(std::vector<X> v) { for (const auto& elm : v) { // ... } }
Diff Detail
Event TimelineJonasToth retitled this revision from Use ExprMutationAnalyzer in performance-unnecessary-value-param to [clang-tidy] Use ExprMutationAnalyzer in performance-unnecessary-value-param.Jul 31 2018, 3:20 PM
Comment Actions LGTM.
This revision is now accepted and ready to land.Aug 3 2018, 1:12 AM shuaiwang marked 2 inline comments as done. Comment ActionsAdd comments explaining CXXCtorInitializer check Closed by commit rL338903: Use ExprMutationAnalyzer in performance-unnecessary-value-param (authored by shuaiwang). · Explain WhyAug 3 2018, 10:24 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 158856 clang-tidy/performance/UnnecessaryValueParamCheck.cpp
test/clang-tidy/performance-unnecessary-value-param.cpp
|
This comment needs to be updated.