[PATCH] D63462: [analyzer] JsonSupport: Escape escapes

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 18 14:20:58 PDT 2019


Charusso added a comment.

In D63462#1549144 <https://reviews.llvm.org/D63462#1549144>, @NoQ wrote:

> Hmm, this doesn't seem to solve my problem in D62761 <https://reviews.llvm.org/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.


Repository:
  rC Clang

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

https://reviews.llvm.org/D63462





More information about the cfe-commits mailing list