[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 8 16:30:35 PST 2021


steveire added a comment.

In D69560#2536597 <https://reviews.llvm.org/D69560#2536597>, @whisperity wrote:

> In D69560#2536570 <https://reviews.llvm.org/D69560#2536570>, @steveire wrote:
>
>> I haven't read through all the comments, but the word 'easily' implies 'desirable'. This check seems to be for finding params which are undesirably swappable, right?
>
> The `easily` was to mean that the swap can be done with little effort (i.e. "in an easy fashion"?) and by accident.

I understand that. The problem is the name. The `signal-to-kill-thread` check is `bad`. The `erase` check is `inaccurate`. The `roundings` check is `incorrect`. The `operator-in-strlen-in-alloc` check is `misplaced`. Those are all words that indicate the negative. Your name indicates the positive ("easily"). The name indicates that the swappable params are desirable.

Why "easily" instead of "suspicious", "spuriously" or any of the other words that are already used?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69560



More information about the cfe-commits mailing list