[PATCH] D98692: [clang-tidy] Add cppcoreguidelines-comparison-operator

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 17 08:36:49 PDT 2021


njames93 added a comment.

In D98692#2631504 <https://reviews.llvm.org/D98692#2631504>, @nullptr.cpp wrote:

> The relevant rule is F.16: For "in" parameters, pass cheaply-copied types by value and others by reference to const <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#f16-for-in-parameters-pass-cheaply-copied-types-by-value-and-others-by-reference-to-const>.
> This should be done in another checker dedicated for parameter passing.

That's not exactly a relevant rule, That describes handling of `In` parameters. However, the point I'm making is we should enforce that parameters to comparison functions are `In` parameters.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98692



More information about the cfe-commits mailing list