This is an archive of the discontinued LLVM Phabricator instance.

[scan-build-py] Prevent crashes of CTU analysis by suppressing warnings
AcceptedPublic

Authored by lorincbalog on Sep 11 2018, 5:49 AM.

Details

Summary

During the mapping of functions for cross-translation unit analysis, the functions' names and the containing files are collected by clang-func-mapping. Warnings are stored in the collection too, which later makes the parsing of the collection fail. Proposed solution is to suppress all warnings during the function mapping.

We are about to create a buildbot to test the CTU changes in Clang by analyzing some open-source projects. At the moment we are blocked by this issue in scan-build-py, because the warnings are causing analyze-build to fail even on Xerces-C++ .

Diff Detail

Event Timeline

lorincbalog created this revision.Sep 11 2018, 5:49 AM

Will this properly synergise across compilers with user-specified warning options, such as -Wall -Werror?

whisperity edited the summary of this revision. (Show Details)Sep 11 2018, 8:33 AM

Yes, -w suppresses all warnings (without raising an error) regardless of the options' sequence, even if -Wall -Werror are present,.

lorincbalog edited the summary of this revision. (Show Details)Sep 20 2018, 1:58 AM

If that helps you, then sure.

I'm not sure I understand why having warnings causes the collection process to fail, but I guess ultimately it's not important.

This revision is now accepted and ready to land.Sep 20 2018, 10:22 AM