[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 24 07:55:03 PDT 2024


================
@@ -123,10 +123,19 @@ New checks
   Gives warnings for tagged unions, where the number of tags is
   different from the number of data members inside the union.
 
+- New :doc:`modernize-use-integer-sign-comparison
+  <clang-tidy/checks/modernize/use-integer-sign-comparison>` check.
+
+  Performs comparisons between signed and unsigned integer types
+  mathematically correct. If C++20 is supported a fix-it replaces
+  integers comparisons to std::cmp_equal, std::cmp_not_equal,
----------------
EugeneZelenko wrote:

Please enclose function names into double back-ticks. Same in other documentation.

https://github.com/llvm/llvm-project/pull/113144


More information about the cfe-commits mailing list