[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 13:39:46 PST 2016


malcolm.parsons added a reviewer: malcolm.parsons.
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 "
----------------
madsravn wrote:
> malcolm.parsons wrote:
> > misc-suspicious-string-compare warns about suspicious `strcmp()`; maybe it should handle `string::compare()` too.
> Do you suggest that I move this check to misc-suspicious-string-compare? Or should we just remove it from here? 
Remove from here and add to misc-suspicious-string-compare in another patch.


https://reviews.llvm.org/D27210





More information about the cfe-commits mailing list