Scan-build can not find .h files

hi, all:
I found scan-build(Checker-275) can not find .h files sometimes when scan the iOS projects.
For example , inclosed rar file has four files.

  1. ,daily build script (without scan-build). and build.log is the log (execute successfully).
  2. , which is has scan-build ,for scan Clang bugs, and scan.log is the log(execute fail).
    See the following error from

/Users/mqq/hudson/clang_QQNote_iphone/Source/QNWNSResponseProtocol.m:13:9: fatal error: ‘SNSLib/JSON.h’ file not found
#import <SNSLib/JSON.h>
1 error generated.

That is the scan-build can not find JSON.h file while the can find for the same iPhone project.

I think the current verison of the scan-build is not smart to search .h file.
Can anyone give me tips? Thanks.

Howard Ling

scan-build.rar (60 KB)

This is still using ccc-analyze; I recommend you stick to Xcode 4.6 and its newer integration when using scan-build for iOS projects. (It’s always had problems like this.)

If you really can’t switch, you could try adding an explicit include path to wherever that header lives in your source tree. I would have expected it to work anyway, but now we’d really prefer people just switch to Xcode 4.6.


scan-build.rar (60 KB)