aaron.ballman added a comment.
Thank you for working on this check!
We already have a frontend diagnostic for comparisons between string literals
and pointers, so I'm not certain of the utility of adding a clang-tidy check
for that case (see -Wstring-compare, aka,
http://coliru.stacked-crooked
hokein added inline comments.
Comment at: clang-tidy/misc/ComparisonMisuseCheck.cpp:31
@@ +30,3 @@
+ unless(anyOf(hasOperatorName("=="), hasOperatorName("!="))),
+ hasEitherOperand(ignoringImpCasts(gnuNullExpr(
+ .bind("compareToNull"),
-
Eugene.Zelenko added inline comments.
Comment at: clang-tidy/misc/ComparisonMisuseCheck.cpp:21
@@ +20,3 @@
+void ComparisonMisuseCheck::registerMatchers(MatchFinder *Finder) {
+
+ Finder->addMatcher(
Please remove this line.
Repository:
rL LLVM
https://revie
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.
Please mention this check in docs/ReleaseNotes.rst (in alphabetical order).
Please run Clang-format on newly added files. Test case is definitely needs it.
Comment at: clang-tidy/misc/ComparisonM