sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land.
Thanks for puzzling this one out, i thought it would be in lexer... ================ Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1127 + // If preamble doesn't end on a new line, include the following byte in + // preamble to enable include completion on a new file. e.g: #include "^ + bool CompletingInPreamble = ---------------- "include the following byte" doesn't match my mental model, which is that we're on the boundary, and are choosing whether to resolve left out right, i.e *guessing* whether inserted text will become part of the preamble or the main file. (Of course everyone has their own mental model - but if that seems clearer to you too, maybe reword) clearer might be: ``` if (Offset < Size || (!EndsInNewline && Offset == Size)) ``` May not even need the comment in this case, up to you Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95419/new/ https://reviews.llvm.org/D95419 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits