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

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 17 05:31:05 PDT 2021


whisperity added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:363
+/// Returns the diagnostic-friendly name of the node, or empty string.
+static SmallString<64> getName(const NamedDecl *ND) {
+  SmallString<64> Name;
----------------
whisperity wrote:
> aaron.ballman wrote:
> > Is this still needed in light of the comments from @riccibruno?
> It doesn't look like to me as if those patches they commented were ever merged, but I'll check it out.
I checked at they haven't been merged yet. Nonetheless, we can remove this logic later once that logic is in.

I added a test case for unnamed parameters with the current logic printing `<unnamed>`, so if the underlying call will return something like `<unnamed parameter @ 24:48>` we will know because that test will blow up.


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

https://reviews.llvm.org/D69560



More information about the cfe-commits mailing list