Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e14d8818 31-Oct-2016 Artem Dergachev <artem.dergachev@gmail.com>

[analyzer] NumberObjectConversion: support more types, misc updates.

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

Enable explici

[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

llvm-svn: 285533

show more ...


# 940c770d 18-Oct-2016 Artem Dergachev <artem.dergachev@gmail.com>

[analyzer] Add NumberObjectConversion checker.

When dealing with objects that represent numbers, such as Objective-C NSNumber,
the language provides little protection from accidentally interpreting

[analyzer] Add NumberObjectConversion checker.

When dealing with objects that represent numbers, such as Objective-C NSNumber,
the language provides little protection from accidentally interpreting
the value of a pointer to such object as the value of the number represented
by the object. Results of such mis-interpretation may be unexpected.

The checker attempts to fill this gap in cases when the code is obviously
incorrect.

With "Pedantic" option enabled, this checker enforces a coding style to
completely prevent errors of this kind (off by default).

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

llvm-svn: 284473

show more ...


12