[PATCH] D114622: [clang-tidy][analyzer] Fix false-positive in IdenticalExprChecker and misc-redundant-expression

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 26 05:08:01 PST 2021


steakhal added a comment.

In D114622#3155605 <https://reviews.llvm.org/D114622#3155605>, @whisperity wrote:

> I haven't looked at the patch in detail yet, but I know I've run into the issue this aims to fix when developing a Tidy check!
>
> There is a `// NOLINTNEXTLINE(misc-redundant-expression)` directive in the source file `clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp` right before a `static_assert` that checks some `type_traits`-y stuff. Should be at line **510** -- according to my local checkout. Could you please remove that line and have that change be part of this patch too? I did a grep on the project and that's the only "user-side" mention to the misc-redundant-... check. Running Tidy on Tidy itself afterwards would turn out to be a nice real-world test that the fix indeed works. 🙂

Yup, it works. I removed your `NOLINT` comment.


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

https://reviews.llvm.org/D114622



More information about the cfe-commits mailing list