forked from OSchip/llvm-project
[analyzer] exploded-graph-rewriter: Fix escaping for bitwise-or.
'|' is a special character in graphviz, so it needs to be properly escaped and unescaped. llvm-svn: 364269
This commit is contained in:
parent
beb85ad66d
commit
14f4de9bb9
|
@ -8,7 +8,7 @@
|
|||
// FIXME: Substitution doesn't seem to work on Windows.
|
||||
// UNSUPPORTED: system-windows
|
||||
|
||||
void string_region_escapes() {
|
||||
void 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>
|
||||
|
@ -16,4 +16,9 @@ void string_region_escapes() {
|
|||
// CHECK-SAME: <td align="left">"foo"</td>
|
||||
// CHECK-SAME: <td align="left">&Element\{"foo",0 S64b,char\}</td>
|
||||
const char *const foo = "foo";
|
||||
|
||||
// CHECK: <font color="cyan3">BinaryOperator</font>
|
||||
// CHECK-SAME: <td align="left">1 \| 2</td>
|
||||
// CHECK-SAME: <td align="left">3 S32b</td>
|
||||
int x = 1 | 2;
|
||||
}
|
||||
|
|
|
@ -300,6 +300,7 @@ class ExplodedGraph(object):
|
|||
.replace('\\{', '{') \
|
||||
.replace('\\}', '}') \
|
||||
.replace('\\\\', '\\') \
|
||||
.replace('\\|', '|') \
|
||||
.replace('\\<', '\\\\<') \
|
||||
.replace('\\>', '\\\\>') \
|
||||
.rstrip(',')
|
||||
|
@ -329,7 +330,7 @@ class DotDumpVisitor(object):
|
|||
.replace('\\<', '<')
|
||||
.replace('\\>', '>')
|
||||
.replace('\\l', '<br />')
|
||||
.replace('|', ''), end='')
|
||||
.replace('|', '\\|'), end='')
|
||||
|
||||
@staticmethod
|
||||
def _diff_plus_minus(is_added):
|
||||
|
|
Loading…
Reference in New Issue