AnakinZheng updated this revision to Diff 245036.
AnakinZheng added a comment.
Implement @sammccall 's suggestion and add test.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74731/new/
https://reviews.llvm.org/D74731
Files:
clang-tools-extra/clangd/SourceCode.cpp
clang-tools-extra/
AnakinZheng marked an inline comment as done.
AnakinZheng added inline comments.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:62
unsigned char C = static_cast(U8[I]);
-if (LLVM_LIKELY(!(C & 0x80))) { // ASCII character.
+if (LLVM_LIKELY(!(C & 0x100))) { // ASC
AnakinZheng marked an inline comment as done.
AnakinZheng added inline comments.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:62
unsigned char C = static_cast(U8[I]);
-if (LLVM_LIKELY(!(C & 0x80))) { // ASCII character.
+if (LLVM_LIKELY(!(C & 0x100))) { // ASC
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(U8[I]);
-if (LLVM_LIKELY(!(C & 0x80))) { // ASCII character.
+if (LLVM_LIKELY(!(C & 0x100))
AnakinZheng updated this revision to Diff 245021.
AnakinZheng added a comment.
Fix the previous stupid mistake.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74731/new/
https://reviews.llvm.org/D74731
Files:
clang-tools-extra/clangd/SourceCode.cpp
Index: clang-tools-extra/clangd/So
AnakinZheng created this revision.
AnakinZheng added reviewers: kadircet, sammccall.
AnakinZheng added a project: clang.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay,
ilya-biryukov.
Previously this piece of code asserts when processing extended ASCII. Proposing
a