scan-build with -analyzer-ipa=dynamic options

Hello Clang,

I'm trying to run scan-build with my own checker, but it seems like
scan-build does not support to control "-analyzer-ipa" options? I
haven't checked the details of scan-build scripts, but -analyzer-ipa
options are hardcoded somewhere and scan-build only uses
"-analyzer-ipa=inlining" options. Is this because IPA analysis is too
expensive to be used for scan-build, or simply it's not implemented
yet?

Thanks,
Byoungyoung

By spending some time with scan-build and ccc-analyzer, I found that
the options provided to the analyzer are set by parsing the output
from "clang -### ...". As far as I know, the default IPA option is
dynamic-bifurcate, but clang shows -dynamic-ipa=inlining.

I've changed scan-build script to control IPA options as follows, and
it works fine. It seems to me that scan-build was not *truly*
supproting interprocedural analysis?

Byoungyoung,

Thanks for uncovering the issue! We've fixed the default ipa setting for clang --analyze in r164543.

We'd prefer to keep analyzer-ipa option hidden from the users of scan-build as we consider it to be an internal option.

Does this work for you?

Cheers,
Anna.

Thanks Anna for quickly fixing this issue! It works great now :slight_smile:

Thanks,
Byoungyoung