[PATCH] [clang-tidy] Add a checker for swapped literal arguments.

Benjamin Kramer benny.kra at gmail.com
Mon Jul 14 04:20:31 PDT 2014


This is essentially a complete rewrite of the checker.

- Only compares pairs of arguments, and emits a swap fixit.
- Also looks at non-literal arguments. This increases false positives slightly but also catches a lot more cases.
- Renamed the checker.

http://reviews.llvm.org/D4457

Files:
  clang-tidy/misc/CMakeLists.txt
  clang-tidy/misc/MiscTidyModule.cpp
  clang-tidy/misc/SwappedArgumentsCheck.cpp
  clang-tidy/misc/SwappedArgumentsCheck.h
  test/clang-tidy/misc-swapped-arguments.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4457.11367.patch
Type: text/x-patch
Size: 8138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140714/17df7078/attachment.bin>


More information about the cfe-commits mailing list