This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Move more checks from misc- to performance-
ClosedPublic

Authored by alexfh on Nov 27 2017, 9:58 AM.

Details

Summary

rename_check.py misc-move-const-arg performance-move-const-arg
rename_check.py misc-noexcept-move-constructor performance-noexcept-move-constructor

Event Timeline

alexfh created this revision.Nov 27 2017, 9:58 AM
alexfh updated this revision to Diff 124553.Nov 28 2017, 5:34 AM
  • clang-format -style=llvm
alexfh updated this revision to Diff 124554.Nov 28 2017, 5:39 AM
  • Reverted formatting in tests.
xazax.hun accepted this revision.Nov 28 2017, 5:40 AM

Found one possible problem. Once fixed, LG!

clang-tidy/hicpp/HICPPTidyModule.cpp
33

Don't you need to add performance module to link to the HICPP module to avoid link errors?

clang-tidy/performance/MoveConstArgCheck.h
18–19

Is there any specific reason to rename this class? I am ok with the change, just wondering.

This revision is now accepted and ready to land.Nov 28 2017, 5:40 AM
alexfh updated this revision to Diff 124580.Nov 28 2017, 8:17 AM
  • Add dependencies to prevent a link error
alexfh marked 2 inline comments as done.Nov 28 2017, 8:18 AM
alexfh added inline comments.
clang-tidy/hicpp/HICPPTidyModule.cpp
33

Indeed. I should probably teach the script to do this ;)

clang-tidy/performance/MoveConstArgCheck.h
18–19

The reason is to make the class name consistent with the check name (which is the case for all checks added by the add_new_check script, but not the case for some checks that predate this script).

This revision was automatically updated to reflect the committed changes.
alexfh marked 2 inline comments as done.