[PATCH] D63519: [analyzer] exploded-graph-rewriter: Fix escaping and unescaping of StringRegions.

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 18 15:11:30 PDT 2019


Charusso accepted this revision.
Charusso marked an inline comment as done.
Charusso added a comment.
This revision is now accepted and ready to land.

Thanks!



================
Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:222
+        Indent(Out, Space, IsDot) << "{ " << CI.getKey() << ", \"value\": ";
+        CI.getData().printJson(Out, true);
+        Out << " }";
----------------
Could you inject `/*AddQuotes=*/`?


================
Comment at: clang/test/Analysis/exploded-graph-rewriter/escapes.c:3
+// RUN: %clang_cc1 -analyze -analyzer-checker=core \
+// RUN:                     -analyzer-dump-egraph=%t.dot %s
+// RUN: %exploded_graph_rewriter %t.dot | FileCheck %s
----------------
I like that styling.


================
Comment at: clang/utils/analyzer/exploded-graph-rewriter.py:287
                                         .replace('\\}', '}') \
+                                        .replace('\\\\', '\\') \
                                         .replace('\\<', '\\\\<') \
----------------
I think this is the correct approach.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63519/new/

https://reviews.llvm.org/D63519





More information about the cfe-commits mailing list