Integrating custom clang/checker plugins in Xcode

I'm working on some custom clang static analyser plugins which I want to integrate in Xcode to verify cocoa applications.

I read that it's not possible to swap the Xcode analyser or the clang. Is there another convenient way to integrate your own checker plugins in Xcode?

My only idea at the moment is to use a build script which uses the custom clang build to verify the build.

Best regards


Hi Arno,

I’m not certain where you read that, because it is simply not true. The set-xcode-analyzer script that we bundle with checker builds has for a very long time now allowed you to swap out your own copy of the analyzer. If you are using a build of Xcode from the last year or so, you can set the CLANG_ANALYZER_EXEC build setting to a full path to your build of clang to use an alternate clang for static analysis. That’s really the recommended way to use a customized clang in Xcode for static analysis.