[PATCH] D74731: [Clangd] Fixed assertion when processing extended ASCII characters.
Yancheng Zheng via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 17 12:02:37 PST 2020
AnakinZheng marked an inline comment as done.
AnakinZheng added a comment.
Update patch.
================
Comment at: clang-tools-extra/clangd/SourceCode.cpp:62
unsigned char C = static_cast<unsigned char>(U8[I]);
- if (LLVM_LIKELY(!(C & 0x80))) { // ASCII character.
+ if (LLVM_LIKELY(!(C & 0x100))) { // ASCII or extended ASCII character.
if (CB(1, 1))
----------------
kadircet wrote:
> `C` is one byte long, it is not possible for it to ever satisfy `C&0x100`.
Updated the patch, now it should be correct.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74731/new/
https://reviews.llvm.org/D74731
More information about the cfe-commits
mailing list