[analyzer] Report CFNumberGetValue API misuse
authorAnna Zaks <ganna@apple.com>
Wed, 26 Oct 2016 22:51:47 +0000 (22:51 +0000)
committerAnna Zaks <ganna@apple.com>
Wed, 26 Oct 2016 22:51:47 +0000 (22:51 +0000)
commit5b2b39065ca6369280f4f07d3dc42f0785721911
tree6c6fd23428c06f86ff48dd929027e4cc0e316c99
parent31d8b7d21d54beeab4eccc60887db798b025235f
[analyzer] Report CFNumberGetValue API misuse

This patch contains 2 improvements to the CFNumber checker:
 - Checking of CFNumberGetValue misuse.
 - Treating all CFNumber API misuse errors as non-fatal. (Previously we treated errors that could cause uninitialized memory as syncs and the truncation errors as non-fatal.)

This implements a subset of functionality from https://reviews.llvm.org/D17954.

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

llvm-svn: 285253
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
clang/test/Analysis/CFNumber.c