alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed.
================ Comment at: clang-tidy/misc/StringCompareCheck.cpp:48 + diag(Matched->getLocStart(), + "do not use compare to test equality of strings; " + "use the string equality operator instead"); ---------------- `compare` should be enclosed in single quotes (`'compare'`), since it refers to a method. ================ Comment at: docs/clang-tidy/checks/misc-string-compare.rst:12 +zero depending on the lexicographical relationship between the strings compared. +If an equality or inequality check can suffice, that is recommended. + ---------------- The documentation doesn't explain why is using `compare` for equality comparison should be avoided. Maybe `that is recommended to avoid the risk of incorrect interpretation of the return value and simplify the code`? https://reviews.llvm.org/D27210 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits