[cfe-dev] Issue count discrepancy in scan-build for Objective-C

Jason Leach jason.leach at fullboar.ca
Tue Jan 3 16:22:19 PST 2012


Hi Ted,

Good idea for a test. It actually finds more issues so Xcode clearly knows how to run the tool better than me. I notice that with the command line execution I see some issues that make me think it is using the old (not modern) runtime:

Example:
error: synthesized property 'persistentStoreCoordinator' must either be named the same as a compatible ivar or must explicitly name an ivar
@synthesize persistentStoreCoordinator;
            ^
5 errors generated.

Any tips on troubleshooting would be appreciated.

J.


On 2012-01-03, at 4:00 PM, Ted Kremenek wrote:

> Hi Jason,
> 
> If you use the 'set-xcode-analyzer' script to change which 'clang' is used directly by Xcode for static analysis, do you get the same number of issues within Xcode as you do for scan-build?  Essentially, if you use the clang in checker-258 directly within Xcode, do you get the same results as when using scan-build?  If so, this is a scan-build issue.  If not, this is a potential regression in the analyzer itself.
> 
> Cheers,
> Ted
> 
> On Jan 3, 2012, at 3:51 PM, Jason Leach wrote:
> 
>> Hi:
>> 
>> I'm curious why I see a discrepancy in the issue count reported from xcode 4.2 vs. scan-build (checker-258). Xcode has found 29 issues while scan-build (258) found 7; most notable are the difference in memory leaks.
>> 
>> Here is how I run scan-build:
>> scan-build --use-cc=`which clang` -k -o scan-reports xcodebuild -target MyTarget -project myproject.xcodeproj -sdk iphonesimulator5.0 -configuration Debug clean build
>> 
>> Thanks in advance.
>> 
>> Regards,
>> 
>> Jason Leach
>> Fullboar Creative Corp.
>> jason.leach at fullboar.ca
>> http://fullboar.ca/
>> 
>> t.  +1.604.800.0266 ext 101
>> c. +1.604.318.3939
>> f.  +1.604.800.0266
>> 
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120103/406729c2/attachment.html>


More information about the cfe-dev mailing list