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 
"
----------------
This message is not used.


================
Comment at: clang-tidy/misc/StringCompareCheck.cpp:37
+      hasArgument(0, expr().bind("str2")), argumentCountIs(1),
+      callee(memberExpr(has(implicitCastExpr(anyOf(
+          
has(callExpr(has(implicitCastExpr(has(declRefExpr())))).bind("str1")),
----------------
Do you really care what the callee expression is? 
Use `isArrow()` on the `MemberExpr` to check if it's a pointer.


================
Comment at: clang-tidy/misc/StringCompareCheck.cpp:67
+
+    if (const auto *zero = Result.Nodes.getNodeAs<Stmt>("zero")) {
+      const auto *str1 = Result.Nodes.getNodeAs<Stmt>("str1");
----------------
All variables should start with a capital letter.


https://reviews.llvm.org/D27210



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to