This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Remove forbidden characters from a SourceLocation filename for a graph dump on Windows
ClosedPublic

Authored by ASDenysPetrov on Jun 18 2020, 8:32 AM.

Details

Summary

Windows forbidden file path characters are used in a field file, while creating a dump dot file using an argument -analyzer-dump-egraph. It specifically relates to angle brackets when using <scratch space>, <built-in>, <command line> values in filenames. It causes that script exploded-graph-rewriter.py incorrectly parses the dump.

Fix: Remove forbidden characters from filename for Windows platform, when creating graph dump file.

This patch shall follow after D82092, since it has a fix for __FILE__ which is used in assert. assert is used in the test here.

Diff Detail

Event Timeline

ASDenysPetrov created this revision.Jun 18 2020, 8:32 AM

Fixed clang-format.

ASDenysPetrov edited the summary of this revision. (Show Details)Jun 19 2020, 4:30 AM
ASDenysPetrov added a reviewer: vsavchenko.
NoQ added inline comments.Jun 19 2020, 7:38 AM
clang/utils/analyzer/exploded-graph-rewriter.py
383 ↗(On Diff #271971)

I think this too doesn't need to be platform specific(?)

ASDenysPetrov marked an inline comment as done.Jun 19 2020, 1:30 PM
ASDenysPetrov added inline comments.
clang/utils/analyzer/exploded-graph-rewriter.py
383 ↗(On Diff #271971)

Oh, so sorry! This is a mess. It somehow got here from my another patch. I'll correct it. This should not be here.

Removed accidentally included unrelated changes.

NoQ accepted this revision.Jun 20 2020, 1:33 AM

Great, thanks!

This revision is now accepted and ready to land.Jun 20 2020, 1:33 AM
This revision was automatically updated to reflect the committed changes.