Fix build with CLANG_ENABLE_STATIC_ANALYZER

Jordan Rose jordan_rose at apple.com
Mon Jun 17 14:21:02 PDT 2013


On Jun 17, 2013, at 14:08 , Stephen Kelly <steveire at gmail.com> wrote:

> Dmitri Gribenko wrote:
> 
>> On Mon, Jun 17, 2013 at 11:19 AM, Jordan Rose
>> <jordan_rose at apple.com> wrote:
>>> Hm. Does clang-check really need the static analyzer? Can it be made
>>> optional there as well? It seems weird that
>>> CLANG_ENABLE_STATIC_ANALYZER=0 would completely prevent clang-check from
>>> building.
>> 
>> IIRC, one can do 'clang-check -analyze ...'
>> 
>> Maybe adding an #ifdef in clang-check source would help.
>> 
> 
> I see no reason to create a version of clang-check which accepts different 
> arguments based on how it was built. I prefer to simply require the static 
> analyzer for that tool, and I don't see why it would be a problem.

Well, that's essentially what happens with the core Clang binary and --analyze, though we don't spread that around much.

I won't block the patch, and we certainly don't want to leave the CMake build broken, but clang-check certainly does more than just 'clang-check -analyze ...', and it seems to be arbitrarily limiting to remove that. I guess I would include a FIXME to properly conditionalize clang-check for CLANG_ENABLE_STATIC_ANALYZER, but then go ahead and commit.

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130617/33c055bf/attachment.html>


More information about the cfe-commits mailing list