-
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Hmm, this doesn't seem to solve my problem in D62761. Let me write some actual test case so that you knew it's fixed when it's fixed.
Well, I have did the same:
if (is_dot_node(line)): node_id = str_between(line, 'Node', ' [shape=record') label = get_label(line) label = (label.replace('\\"', '"').replace('\\\\', '\\') ...
I believe this is the correct behavior. What I have pointed out is the opposite: when we have a unicode character we have to escape it, so it would be that \\\\ case. Rewrite that to '\\' is cool and safe.
I mean, i'm removing backslashes but you're adding more backslashes. Therefore i think we're talking about different issues.
You *have to* remove backslashes, because sometimes we have \\\\ so two of them packed together. Then when you remove it, it will be only one (\\ ), which is handled by JSON properly. Sadly it is very strict and cannot predict two should not be a problem.
My problem is demonstrated (and solved) by D63519. If i revert my changes but apply this patch instead, my test keeps failing.
That is what we want. .replace('\\\\', '\\') \ is perfect, and should work with that patch as I use it as well.
Thx!
I guess it makes sense to add a test into test/Analysis/exploded-graph-rewriter/escapes.c as well, so that to learn if we can actually parse it later.
Well, after a month of escaping we are still have problems, so it is truly comes to your brain.