I have been able to run the Static Analyzer on my code fine for months. All of a sudden now I am getting the error:
<command line>:0:0 Analyzer skipped this file due to parse errors
Not sure how to diagnose.
The first tile it skips is:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:0:0 Analyzer skipped this file due to parse errors
I get these errors too if I try to use it when the target is set to the simulator, but if I switch the target to the device then it works.
Typically, this is a result of a syntax error or something else that is preventing your code from compiling.
Because you are only seeing errors when you go to analyze your code, not when it compiles, I bet that you are using the GCC compiler for your main application builds. Clang / LLVM has a bug in the iOS 4.1 SDK that causes compilation errors when targeting the Simulator, but not the device. The Clang Static Analyzer is probably exhibiting this same bug.
The solution I provide in my answer to the above-linked question should work to fix this as well. However, it may lead to compilation errors when you switch back to build your application with GCC, so I recommend switching your compiler over to LLVM. Unless you are using C++ code, I recommend using LLVM for iPhone projects anyway, due to the minor performance boosts you can get in your compiled application with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With