[PATCH] D74731: [Clangd] Fixed assertion when processing extended ASCII characters.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 17 11:07:57 PST 2020
kadircet added inline comments.
================
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))
----------------
`C` is one byte long, it is not possible for it to ever satisfy `C&0x100`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74731/new/
https://reviews.llvm.org/D74731
More information about the cfe-commits
mailing list