[SERVER-77896] enable performance-unnecessary-value-param clang-tidy check Created: 07/Jun/23  Updated: 02/Feb/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Alex Neben Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Build
Backwards Compatibility: Fully Compatible
Participants:

 Description   

Add clang-tidy check for the following

https://releases.llvm.org/12.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/performance-unnecessary-value-param.html

 

You should make the change in to add this check in ".clang-tidy.in", rerun the command to generate compile_commands.json "python3 ./buildscripts/scons.py --build-profile=compiledb compiledb", the run clang-tidy "python3 buildscripts/clang_tidy.py" and fix the areas where it shows problems. If this turns out to be a significant amount of changes (>50) then lets sync and see if this is worth doing. We might want to punt depending on how significant this is.



 Comments   
Comment by Matt Boros [ 06/Sep/23 ]

Discussed with Steve, it looks like the performance-no-automatic-move was enabled in this PR rather than the performance-unnecessary-value-param rule. The value rule is disabled. Could we reopen this ticket and enable the value rule? (I've tried reopening it, for some reason it's not working)

Comment by Steve Gross [ 20/Jun/23 ]

PR merged; all done!

Comment by Githook User [ 16/Jun/23 ]

Author:

{'name': 'Steve Gross', 'email': 'steve.gross@mongodb.com', 'username': 'stevegrossmongodb'}

Message: SERVER-77896 Enable performance-no-automatic-move clang-tidy check
Branch: master
https://github.com/mongodb/mongo/commit/ddb337d0623e670a7d392dc6e92c96efb7841e80

Comment by Steve Gross [ 14/Jun/23 ]

Aha, I have learned that the "-" prefix disables the check. So, it has to be enabled as part of this work. Will do!

Comment by Steve Gross [ 14/Jun/23 ]

I see that performance-unnecessary-value-param is already present in clang-tidy. If so, sounds like this is already implemented?

 

Comment by Steve Gross [ 14/Jun/23 ]

I finished the dev environment setup steps, so I'm now looking into what it takes to implement this request.

Generated at Thu Feb 08 06:36:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.