[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

Mads Ravn via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 30 09:18:49 PST 2016


So remove the ifStmt from the third and fourth case?

So that I keep if(str1.compare(str2)) and if(!str1.compare(str2)), and
change the other two to str1.compare(str2) == 0 and str1.compare(str2) != 0
?

That makes good sense. Then I could also add some of the test cases you
mentioned earlier.

On Wed, Nov 30, 2016 at 5:59 PM Malcolm Parsons via Phabricator <
reviews at reviews.llvm.org> wrote:

> malcolm.parsons added a comment.
>
> I don't know why you're restricting this check to only match within the
> condition of an if statement.
>
>
> https://reviews.llvm.org/D27210
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161130/ac59cd64/attachment.html>


More information about the cfe-commits mailing list