[PATCH] D130081: Add foldings for multi-line comment.

Utkarsh Saxena via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 26 21:15:34 PDT 2022


usaxena95 added inline comments.


================
Comment at: clang-tools-extra/clangd/SemanticSelection.cpp:232
+    while (T != Tokens.end() && T->Kind == tok::comment &&
+           LastComment->Line == T->Line + 1) {
+      LastComment = T;
----------------
hokein wrote:
> this seems incorrect -- the ` LastComment->Line == T->Line + 1` condition is not true initially (because `LastComment == T`), so we will never run into this loop, then I'm confused, why the unittest are passed (premerge test is green).
I think I missed to update the patch last time I fixed this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130081/new/

https://reviews.llvm.org/D130081



More information about the cfe-commits mailing list