]> granicus.if.org Git - clang/commit
[analyzer] NumberObjectConversion: support more types, misc updates.
authorArtem Dergachev <artem.dergachev@gmail.com>
Mon, 31 Oct 2016 03:08:48 +0000 (03:08 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 31 Oct 2016 03:08:48 +0000 (03:08 +0000)
commitf4ae46b2938235a555fe41f7c8f4e2263025e03a
tree68e1accb25acc165229ef1286db749cca54746ce
parentcc28bf9b7760908d1087227177762cd4fdf9cc13
[analyzer] NumberObjectConversion: support more types, misc updates.

Support CFNumberRef and OSNumber objects, which may also be accidentally
converted to plain integers or booleans.

Enable explicit boolean casts by default in non-pedantic mode.

Improve handling for warnings inside macros.

Improve error messages.

Differential Revision: https://reviews.llvm.org/D25731

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285533 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp
test/Analysis/number-object-conversion.c [new file with mode: 0644]
test/Analysis/number-object-conversion.cpp
test/Analysis/number-object-conversion.m