[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy
Malcolm Parsons via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 26 10:46:20 PST 2016
malcolm.parsons added inline comments.
================
Comment at: clang-tidy/misc/StringCompareCheck.cpp:25
+ "operator instead";
+static const StringRef GuaranteeMessage = "'compare' is not guaranteed to "
+ "return -1 or 1; check for bigger or "
----------------
misc-suspicious-string-compare warns about suspicious `strcmp()`; maybe it should handle `string::compare()` too.
================
Comment at: clang-tidy/misc/StringCompareCheck.h:23
+/// For the user-facing documentation see:
+/// http://clang.llvm.org/extra/clang-tidy/checks/misc-string-compare-check.html
+class StringCompareCheck : public ClangTidyCheck {
----------------
Change filename to misc-string-compare.html
================
Comment at: docs/ReleaseNotes.rst:81
+
+ Warns about using ``compare`` to test for string equality or ineqaulity.
+
----------------
typo. ineqaulity -> inequality
https://reviews.llvm.org/D27210
More information about the cfe-commits
mailing list