Re: [PATCH] D22968: [analyzer] A checker for macOS-specific bool-like objects.

2016-09-23 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Here are more comments. Could you address/answer these and upload the latest patch that compares NSNumber to other numbers? Thanks! Comment at: lib/StaticAnalyzer/Checkers/BoolConversionChecker.cpp:88 @@ +87,3 @@ + +auto NSNumberExprM = +

Re: [PATCH] D22968: [analyzer] A checker for macOS-specific bool-like objects.

2016-09-12 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Let's test it on more real word bugs. Comment at: lib/StaticAnalyzer/Checkers/BoolConversionChecker.cpp:11 @@ +10,3 @@ +// This file defines BoolConversionChecker, which checks for a particular +// common mistake when dealing with NSNumber and OSBoolea

Re: [PATCH] D22968: [analyzer] A checker for macOS-specific bool-like objects.

2016-08-26 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/BoolConversionChecker.cpp:62 @@ +61,3 @@ + << "' to a plain boolean value: probably a forgotten " + << (IsObjC ? "'[boolValue]'" : "'->isTrue()'"); +BR.EmitBasicReport( - The