sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang-tools-extra/clangd/Selection.cpp:517 + // But if that's whitespace/semicolon, we likely want the token on the left. + if (isWhitespace(Buf[Offset]) || Buf[Offset] == ';') return {Offset - 1, Offset}; ---------------- Would you mind preserving the prev-character check? I don't know how to observe it in tests, but when debugging SelectionTree (e.g. `for (;;)`) it's nice to have the internal state be what you expect. I'd suggest extracting a lambda IsIgnoredChar or so to keep the condition simple. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70807/new/ https://reviews.llvm.org/D70807 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits