[PATCH] D82103: [analyzer] Remove forbidden characters from a SourceLocation filename for a graph dump on Windows

Denys Petrov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 18 08:40:52 PDT 2020


ASDenysPetrov created this revision.
ASDenysPetrov added reviewers: Charusso, NoQ.
ASDenysPetrov added a project: clang.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.

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 <https://reviews.llvm.org/D82092>, since it has a fix for `assert`. `assert` is used in the test here.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82103

Files:
  clang/include/clang/Basic/JsonSupport.h
  clang/test/Analysis/exploded-graph-rewriter/l_directory_from_l/win_file_macros.cpp
  clang/test/Analysis/exploded-graph-rewriter/win_filepath.cpp
  clang/utils/analyzer/exploded-graph-rewriter.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82103.271727.patch
Type: text/x-patch
Size: 5516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200618/1fb18ea8/attachment-0001.bin>


More information about the cfe-commits mailing list