[PATCH] D128861: [clang-tidy] add cppcoreguidelines-symmetric-binary-operator

Julian Schmidt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 30 13:40:02 PDT 2022


5chmidti added a comment.

Question: Should this check be extended to also include C.86 <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c86-make--symmetric-with-respect-to-operand-types-and-noexcept>: "Flag an operator==() for which the argument types differ; same for other comparison operators: !=, <, <=, >, and >=."? With a warning along the lines of: "comparison operators should be symmetric with respect to the parameters types" or "parameters of comparison operators should be of the same type" (or some other warning). Or should that be a new check? I think it fits.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128861



More information about the cfe-commits mailing list