Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[analyzer] exploded-graph-rewriter: Fix escaping StringRegions.
Quotes around StringRegions are now escaped and unescaped correctly, producing valid JSON. Additionally, add a forgotten escape for Store values. Differential Revision: https://reviews.llvm.org/D63519 llvm-svn: 363897
- Loading branch information
Showing
4 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// FIXME: Figure out how to use %clang_analyze_cc1 with our lit.local.cfg. | ||
// RUN: %clang_cc1 -analyze -triple x86_64-unknown-linux-gnu \ | ||
// RUN: -analyzer-checker=core \ | ||
// RUN: -analyzer-dump-egraph=%t.dot %s | ||
// RUN: %exploded_graph_rewriter %t.dot | FileCheck %s | ||
|
||
// FIXME: Substitution doesn't seem to work on Windows. | ||
// UNSUPPORTED: system-windows | ||
|
||
void string_region_escapes() { | ||
// CHECK: <td align="left"><b>Store: </b></td> | ||
// CHECK-SAME: <td align="left">foo</td><td align="left">0</td> | ||
// CHECK-SAME: <td align="left">&Element\{"foo",0 S64b,char\}</td> | ||
// CHECK: <td align="left"><b>Environment: </b></td> | ||
// CHECK-SAME: <td align="left">"foo"</td> | ||
// CHECK-SAME: <td align="left">&Element\{"foo",0 S64b,char\}</td> | ||
const char *const foo = "foo"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters