tbaeder added inline comments.
================ Comment at: clang/lib/Frontend/TextDiagnostic.cpp:124-128 + if (CharSize == 1 && llvm::isLegalUTF8Sequence(Begin, End) && + llvm::sys::locale::isPrint(*Begin)) { + ++(*I); + return std::make_pair(SmallString<16>(Begin, End), true); + } ---------------- cor3ntin wrote: > this could be simplified : the common case for ascii could be just looking at > `isPrint(*Begin);` (which implies CharSize == 1 and > llvm::isLegalUTF8Sequence(Begin, End)) > So you could do it before computing CharSize This is not true in my testing fwiw. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150843/new/ https://reviews.llvm.org/D150843 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits