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. + // 11111xxx is not valid UTF-8 at all. Assert because it's probably our bug. + assert((UTF8Length >= 2 && UTF8Length <= 4) && ---------------- This is user input, right? Have we actually checked for valid UTF-8, or do we just assume it's valid? If not, it seems like an assertion is not the right check, but we should reject it when we're reading the input. Repository: rL LLVM https://reviews.llvm.org/D46035 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits