MandyW
MandyW

Reputation: 1147

Clang scan-build is not picking up -fno-objc-arc flag on non-ARC'd files

Hi I have an XCode project which is ARCd but uses some 3rd party (AFNetworking) classes which are not ARCd. I have specified the -fno-objc-arc flag against these files however when I run scan-build I get a number of errors such as:-

error: 'autorelease' is unavailable: not available in automatic reference counting mode

I can see that scan-build is using -fobjc-arc when compiling / checking these classes which is incorrect.

Please could someone advise how I can get scan-build to pick up the correct settings?

FYI I am using checker-267 version downloaded from http://clang-analyzer.llvm.org/

Many thanks

Upvotes: 1

Views: 141

Answers (1)

MandyW
MandyW

Reputation: 1147

Raised this with the clang team at Apple and they swiftly came back to say that this is a known bug, see:

http://llvm.org/bugs/show_bug.cgi?id=13683

A new version of the checker should be released soon to fix this.

Upvotes: 1

Related Questions