malcolm.parsons added a comment.

I think you could add fixits for this.



================
Comment at: clang-tidy/misc/MiscStringCompareCheck.cpp:48
+  Finder->addMatcher(ifStmt(hasCondition(binaryOperator(hasOperatorName("=="),
+                                                        hasLHS(strCompare))))
+                         .bind("match"),
----------------
Doesn't test RHS.


================
Comment at: clang-tidy/misc/MiscStringCompareCheck.cpp:54
+  Finder->addMatcher(ifStmt(hasCondition(binaryOperator(hasOperatorName("!="),
+                                                        hasLHS(strCompare))))
+                         .bind("match"),
----------------
Doesn't test RHS.
Could be combined with the previous case.


================
Comment at: clang-tidy/misc/MiscStringCompareCheck.h:24
+/// 
http://clang.llvm.org/extra/clang-tidy/checks/misc-string-compare-check.html
+class MiscStringCompareCheck : public ClangTidyCheck {
+public:
----------------
Remove `Misc`.

Did you use add_new_check.py to add this check?


================
Comment at: docs/clang-tidy/checks/misc-string-compare.rst:4
+misc-string-compare
+=======================
+
----------------
Too many `=`.


Repository:
  rL LLVM

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