This is an archive of the discontinued LLVM Phabricator instance.

[scan-build-py] Patch to fix "-analyzer-config" option
ClosedPublic

Authored by haowei on Jun 21 2017, 4:57 PM.

Details

Summary

I noticed that when I use "-analyze-config" option in scan-build-py, it behaves differently from original perl based scan-build.

For example, command:

$ scan-build -analyzer-config ipa=basic-inlining make

Will work without any issues on perl version of scan-build. But on scan-build-py it will throw an error message "error reading 'ipa=basic-inlining'".
After debugging, it turns out that the scan-build-py does not put "-analyzer-config" flag in front of the analyzer config flags (in this case is the "ipa=basic-inlining") in the final clang command line. This patch fixes this issue.

Diff Detail

Repository
rL LLVM

Event Timeline

haowei created this revision.Jun 21 2017, 4:57 PM
phosek accepted this revision.Jul 5 2017, 6:21 PM

LGTM

This revision is now accepted and ready to land.Jul 5 2017, 6:21 PM
This revision was automatically updated to reflect the committed changes.