[PATCH] D17987: Extension of checker misc-misplaced-widening-cast

Balogh, Ádám via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 9 04:44:26 PST 2016


baloghadamsoftware created this revision.
baloghadamsoftware added a reviewer: alexfh.
baloghadamsoftware added a subscriber: cfe-commits.

Existing checker misc-misplaced-widening-cast was extended:
- New use cases: casted expression as lhs or rhs of a logical comparison or function argument
- New types: beside int, long and long long various char types, short and int128 added
- New option to check implicit casts: forgetting a cast is at least as common and as dangerous as misplacing it. This option can be disabled.

This patch depends on AST Matcher patch D17986 and also contains fix for checker misc-bool-pointer-implicit-conversion needed because of the fix in the AST Matcher patch.

http://reviews.llvm.org/D17987

Files:
  clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp
  clang-tidy/misc/MisplacedWideningCastCheck.cpp
  clang-tidy/misc/MisplacedWideningCastCheck.h
  docs/clang-tidy/checks/misc-misplaced-widening-cast.rst
  test/clang-tidy/misc-misplaced-widening-cast.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17987.50121.patch
Type: text/x-patch
Size: 14775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160309/261ae664/attachment-0001.bin>


More information about the cfe-commits mailing list