[PATCH] D74463: [clang-tidy] Add new check avoid-adjacent-unrelated-parameters-of-the-same-type

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 16 11:41:46 PST 2020


njames93 added a comment.

In D74463#1878290 <https://reviews.llvm.org/D74463#1878290>, @vingeldal wrote:

> I am pretty sure that an option to allow short names would cause  a relatively big hit on performance (relative to how it runs without the option) for this check while also potentially causing some false negatives (which I would very much like to avoid).


Highly unlikely, the additional name length check would only be ran on functions where the consecutive param types occur, then the check itself is very fast, you don't even need to compute the length as its stored in the identifier info, finally on cases where the name check prevents a diagnostic that is a huge performance win. The false negatives could kind of be an issue, but we could leave that up to the developer who is running the check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74463





More information about the cfe-commits mailing list