[PATCH] D88567: [clangd] Fix invalid UTF8 when extracting doc comments.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 1 01:52:35 PDT 2020
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/CodeCompletionStrings.cpp:93
+ // Clang requires source to be UTF-8, but doesn't enforce this in comments.
+ if (!llvm::json::isUTF8(Doc))
+ Doc = llvm::json::fixUTF8(Doc);
----------------
sammccall wrote:
> kadircet wrote:
> > it is always surprising to have these helpers in json library :D (just talking out loud)
> Yeah. They're just wrappers around functions from `ConvertUTF.h`.
> Do you want a patch to move them there?
nah, let's wait for the next time we use those :D
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88567/new/
https://reviews.llvm.org/D88567
More information about the cfe-commits
mailing list