[analyzer] Remove forbidden characters from a filename for a graph dump on Windows
authorDenys Petrov <dpetrov@accesssoftek.com>
Mon, 22 Jun 2020 12:35:57 +0000 (15:35 +0300)
committerDenys Petrov <dpetrov@accesssoftek.com>
Mon, 22 Jun 2020 14:27:20 +0000 (17:27 +0300)
commitbe9c5818351bf99a193edbc82e4dc25ab5206a44
tree121cd70ed13804b8219fcc22807f98301674bb98
parent02022ff2e3f2f4d39d5926e93ecfa77395a1e9ea
[analyzer] Remove forbidden characters from a filename for a graph dump on Windows

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.

Differential Revision: https://reviews.llvm.org/D82103
clang/include/clang/Basic/JsonSupport.h
clang/test/Analysis/exploded-graph-rewriter/win_path_forbidden_chars.cpp [new file with mode: 0644]