================ @@ -1251,7 +1251,7 @@ highlightLines(StringRef FileData, unsigned StartLineNumber, unsigned LineLength = 0; for (unsigned I = 0; I <= Spelling.size(); ++I) { // This line is done. - if (isVerticalWhitespace(Spelling[I]) || I == Spelling.size()) { + if (I == Spelling.size() || isVerticalWhitespace(Spelling.at(I))) { ---------------- cor3ntin wrote:
The bug was the order of the instruction, the `at` is not doing anything useful here here. checking the size first should be necessary and sufficient. The interesting question is why that wasn't caught by tools? We have a repro? ( I don't insist on having one to land that though) https://github.com/llvm/llvm-project/pull/80023 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits