[PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

Etienne Bergeron via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 1 13:55:59 PDT 2016


etienneb added a comment.

Eugene, I double checked and the implicit bool version doesn't trigger in C.
This check is applied in C and C++.
(note: I needed to add code to fix C)


================
Comment at: docs/clang-tidy/checks/misc-suspicious-string-compare.rst:13
@@ +12,3 @@
+.. code:: c++
+    if (strcmp(...))       // Implicitly compare to zero
+    if (!strcmp(...))      // Won't warn
----------------
Any idea how to validate the look after formatting?


http://reviews.llvm.org/D18703





More information about the cfe-commits mailing list