[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-26 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285253: [analyzer] Report CFNumberGetValue API misuse (authored by zaks). Changed prior to commit: https://reviews.llvm.org/D25876?vs=75488=75961#toc Repository: rL LLVM

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-25 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: test/Analysis/CFNumber.c:39 + unsigned char scalar = 0; + CFNumberGetValue(x, kCFNumberSInt16Type, ); // expected-warning{{A CFNumber object that represents a 16-bit integer is used to initialize an 8-bit integer; 8 bits of the

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-25 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/CFNumber.c:39 + unsigned char scalar = 0; + CFNumberGetValue(x, kCFNumberSInt16Type, ); // expected-warning{{A CFNumber object that represents a 16-bit integer is used to initialize an 8-bit integer; 8 bits of the

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-21 Thread Anna Zaks via cfe-commits
zaks.anna updated this revision to Diff 75488. zaks.anna added a comment. Address comments from Devin. https://reviews.llvm.org/D25876 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp test/Analysis/CFNumber.c Index:

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-21 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. LGTM! https://reviews.llvm.org/D25876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-21 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: test/Analysis/CFNumber.c:39 + unsigned char scalar = 0; + CFNumberGetValue(x, kCFNumberSInt16Type, ); // expected-warning{{A CFNumber object that represents a 16 bit integer is used to initialize an 8 bit integer. 8 bits of the

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-21 Thread Anna Zaks via cfe-commits
zaks.anna created this revision. zaks.anna added reviewers: dcoughlin, NoQ. zaks.anna added subscribers: cfe-commits, rgov. This patch contains 2 improvements to the CFNumber checker: - Checking of CFNumberGetValue misuse. - Treating all CFNumber API misuse errors as non-fatal. (Previously we