[PATCH] D110823: [clangd] Add code completion of param name on /* inside function calls.

Adam Czachorowski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 19 04:00:38 PDT 2021


adamcz added inline comments.


================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1963
+    auto OffsetBeforeComment = *Offset - 2;
+    return codeCompleteComment(FileName, OffsetBeforeComment, Preamble,
+                               ParseInput);
----------------
kadircet wrote:
> adamcz wrote:
> > kadircet wrote:
> > > i think we should propagate `Opts` here and then override the pieces accordingly.
> > Hmm...why?
> > 
> > It seems that everything that could be relevant would be overridden here. SignatureHelp, which is very similar to this, doesn't use code complete options either. I think it may be confusing to accept an object but then override literally every single thing that matters anyway.
> > 
> > It's not unlikely that in the future we'll need options, but for now it seems useless. Do you have a specific option you want propagated?
> ah nvm. I confused `clang::CodeCompleteOptions` with `clangd`s
Done. Amusingly, this changed the output of the CompletionRange test. Technically it fixed the issue that test was demonstrating, but only for that one very specific case, so I changed the test to continue demonstating the problem (difference between Sema and non-Sema behavior).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110823



More information about the cfe-commits mailing list