[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
Thu Dec 1 09:17:54 PST 2016


malcolm.parsons added inline comments.


================
Comment at: docs/clang-tidy/checks/misc-string-compare.rst:21
+  
+  if(str1.compare(str2)) {} // use str1 != str2 instead
+  
----------------
Please clang-format this code.


================
Comment at: test/clang-tidy/misc-string-compare.cpp:15
+};
+  bool operator==(const basic_string<char> lhs, const basic_string<char> rhs);
+  bool operator!=(const basic_string<char> lhs, const basic_string<char> rhs);
----------------
Missing &s.
Please clang-format this file.


https://reviews.llvm.org/D27210





More information about the cfe-commits mailing list