[PATCH] D46274: [Support] Harden JSON against invalid UTF-8.

Sam McCall via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 30 11:38:51 PDT 2018


On Mon, Apr 30, 2018, 20:26 Ben Hamilton via Phabricator <
reviews at reviews.llvm.org> wrote:

> benhamilton added a comment.
>
> Is it super tricky to at least extract the UTF-8 validating and sanitizing
> functions into their own header and source files within the `Support`
> library, if not a separate library?
>
It's not *technically* hard, but it will encourage wide use for general
purposes, attract patches to extend its functionality, and confuse people
as that functionality overlaps with ConvertUTF more and more.

I think it's probably a good idea, but if I were reviewing it, I'd want to
see that the author has a clear plan (that isn't MiscUnicodeUtils.h or
rewriting ICU!)


> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D46274
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180430/c516df52/attachment.html>


More information about the llvm-commits mailing list