This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Fix scan-build to handle missing output directories.
ClosedPublic

Authored by ygribov on Nov 10 2015, 2:51 AM.

Details

Summary

Cwd::abs_path has a somewhat tricky semantics: if it's operand directory does not exist, it'll return undefined (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257568). This may cause scan-build to silently ignore output directory (specified with -o) and use /tmp instead of trying to create directory. This tiny patch fixes the problem.

Diff Detail

Repository
rL LLVM

Event Timeline

ygribov updated this revision to Diff 39799.Nov 10 2015, 2:51 AM
ygribov retitled this revision from to [analyzer] Fix scan-build to handle missing output directories..
ygribov updated this object.
ygribov added reviewers: zaks.anna, dcoughlin.
ygribov set the repository for this revision to rL LLVM.
ygribov added a subscriber: llvm-commits.
dcoughlin accepted this revision.Nov 11 2015, 11:37 AM
dcoughlin edited edge metadata.

Looks good to me. I will commit.

This revision is now accepted and ready to land.Nov 11 2015, 11:37 AM
This revision was automatically updated to reflect the committed changes.