[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 2 00:56:22 PST 2016
xazax.hun added inline comments.
================
Comment at: docs/clang-tidy/checks/misc-string-compare.rst:10
+equality or inequality operators. The compare method is intended for sorting
+functions and thus returns ``-1``, ``0`` or ``1`` depending on the lexicographical
+relationship between the strings compared. If an equality or inequality check
----------------
As far as I remember this is not true. The ``compare`` method can return any integer number, only the sign is defined. It is not guaranteed to return -1 or 1 in case of inequality.
https://reviews.llvm.org/D27210
More information about the cfe-commits
mailing list