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

Mads Ravn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 3 04:34:54 PST 2016


madsravn updated this revision to Diff 80177.
madsravn added a comment.

Did as comments suggested: Fixed the description about compare returning -1, 0 or 1. Fixed the ast matcher to only find compare with one argument. Clang-formatted everything. Added a new test (str.compare("foo")) and wrote a FIXME for the fixit.


https://reviews.llvm.org/D27210

Files:
  clang-tidy/misc/CMakeLists.txt
  clang-tidy/misc/MiscTidyModule.cpp
  clang-tidy/misc/StringCompareCheck.cpp
  clang-tidy/misc/StringCompareCheck.h
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/misc-string-compare.rst
  test/clang-tidy/misc-string-compare.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27210.80177.patch
Type: text/x-patch
Size: 10072 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161203/85b7ca92/attachment-0001.bin>


More information about the cfe-commits mailing list