[PATCH] D31992: [clangd] Escape only necessary characters in JSON output

Joerg Sonnenberger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 13 12:16:18 PDT 2017


joerg added a comment.

In https://reviews.llvm.org/D31992#725963, @klimek wrote:

> If I understand correctly, that's " and \ for JSON and ", \ and all non-printable characters (which unfortunately requires understanding of unicode to solve this fully correctly) in YAML.


I'd modify that slightly: let's escape those two and all the known ASCII control characters, but just pass the rest through. I.e. reduce the current \x etc handling to known problematic input and not second guess the rest.


Repository:
  rL LLVM

https://reviews.llvm.org/D31992





More information about the cfe-commits mailing list