[PATCH] D69560: [clang-tidy] Add 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type' check

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 8 08:48:33 PST 2021


whisperity added a comment.

I have posted two questions to GitHub, mostly related to the guideline rule and how free the implementation could be: #1732 <http://github.com/isocpp/CppCoreGuidelines/issues/1732> and #1733 <http://github.com/isocpp/CppCoreGuidelines/issues/1733>, I think I tagged you on both.

However, if we are going down the alias route, I think it should be the guideline version which is the alias, and this check should live under a different name. Where do you think should we put it? I think `bugprone-` is the best fit, and `readability-` is the second-best... The "avoid adjacent parameter of similar types" name could stay... or something like `...-easily-swappable-function-parameters`, that involves all the features here, with things like "default length 3" and such, "relatedness" heuristics turned on. Not sure what CVR-modelling's default should be... it finds less when "off", but too easily silences crucial issues (such as `memcpy(T*, const T*)`).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69560/new/

https://reviews.llvm.org/D69560



More information about the cfe-commits mailing list