sammccall added inline comments.
Comment at: clang-tools-extra/trunk/clangd/SourceCode.cpp:38
+// 0xxx is ASCII, handled above. 10xxx is a trailing byte, invalid here.
+// 1xxx is not valid UTF-8 at all. Assert because it's probably our
bug.
+assert((UTF8Length >
benhamilton added inline comments.
Comment at: clang-tools-extra/trunk/clangd/SourceCode.cpp:38
+// 0xxx is ASCII, handled above. 10xxx is a trailing byte, invalid here.
+// 1xxx is not valid UTF-8 at all. Assert because it's probably our
bug.
+assert((UTF8Length
sammccall added inline comments.
Comment at: clang-tools-extra/trunk/clangd/SourceCode.cpp:38
+// 0xxx is ASCII, handled above. 10xxx is a trailing byte, invalid here.
+// 1xxx is not valid UTF-8 at all. Assert because it's probably our
bug.
+assert((UTF8Length >
benhamilton added inline comments.
Comment at: clang-tools-extra/trunk/clangd/SourceCode.cpp:38
+// 0xxx is ASCII, handled above. 10xxx is a trailing byte, invalid here.
+// 1xxx is not valid UTF-8 at all. Assert because it's probably our
bug.
+assert((UTF8Length
sammccall added inline comments.
Comment at: clang-tools-extra/trunk/clangd/SourceCode.cpp:38
+// 0xxx is ASCII, handled above. 10xxx is a trailing byte, invalid here.
+// 1xxx is not valid UTF-8 at all. Assert because it's probably our
bug.
+assert((UTF8Length >
benhamilton added inline comments.
Comment at: clang-tools-extra/trunk/clangd/SourceCode.cpp:38
+// 0xxx is ASCII, handled above. 10xxx is a trailing byte, invalid here.
+// 1xxx is not valid UTF-8 at all. Assert because it's probably our
bug.
+assert((UTF8Length
This revision was automatically updated to reflect the committed changes.
sammccall marked 2 inline comments as done.
Closed by commit rL331029: [clangd] Fix unicode handling, using UTF-16 where
LSP requires it. (authored by sammccall, committed by ).
Herald added a subscriber: llvm-commits.
Chan
sammccall marked 3 inline comments as done.
sammccall added a comment.
Thanks!
Comment at: clangd/SourceCode.cpp:25
+// Returns true if CB returned true, false if we hit the end of string.
+template
+bool iterateCodepoints(StringRef U8, const Callback &CB) {
h
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Cool, the code looks good to me (just a few nits), thanks for the descriptive
comments!
> This seems likely to cause problems with editors that have the same bug, and
> treat the protocol as
sammccall updated this revision to Diff 143838.
sammccall added a comment.
Remove some debugging junk, tweak a comment.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46035
Files:
clangd/ClangdServer.cpp
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/CodeComplete.cpp
sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov,
klimek.
The Language Server Protocol unfortunately mandates that locations in files
be represented by line/column pairs, where the "column" is actua
sammccall updated this revision to Diff 143836.
sammccall added a comment.
clang-format
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46035
Files:
clangd/ClangdServer.cpp
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/CodeComplete.cpp
clangd/Protocol.h
clangd/Sou
12 matches
Mail list logo