Page MenuHomePhabricator

[analyzer][scan-build-py] subprocess output handling reviewed in clang module
ClosedPublic

Authored by rizsotto.mailinglist on Apr 19 2016, 5:32 AM.

Details

Summary

In python subprocess.check_output is an easy way to collect child process output. Current implementation does deal with Popen class, which requires more code to get the desired output lines. Beside the simplifications, this patch also introduce a few more tests on active checker logic.

Diff Detail

Event Timeline

rizsotto.mailinglist retitled this revision from to [analyzer][scan-build-py] subprocess output handling reviewed in clang module.
rizsotto.mailinglist updated this object.
rizsotto.mailinglist added a subscriber: cfe-commits.
dcoughlin accepted this revision.Jun 9 2016, 6:17 PM
dcoughlin edited edge metadata.

This looks good to me. I've run this on a suite of open source projects and it reported no changes in the reference results. Thanks for simplifying and adding the extra tests!

tools/scan-build-py/libscanbuild/clang.py
90

What's the benefit of using a function attribute here rather than simply closing over a local variable?

This revision is now accepted and ready to land.Jun 9 2016, 6:17 PM

hey Devin, thanks for looking to it.

tools/scan-build-py/libscanbuild/clang.py
90

there is no difference between the two. (it even can be written in the same order.) i guess, just wanted to decorate the name of the variable. i have no preference.

Looks like patch was not committed.

commited at r282317