hokein added a comment.

I'm not sure the new behavior suits all cases, it seems to me that this will 
change a typical behavior (usually when users invoke function calls).

Imaging a case:

  void foo(int a, int b);
  
  void call() {
    fo^
  }



- before, the final cursor is at the end of the snippet
- after, the final cursor is at the last parameter of `foo`.

I think the previous cursor location is more convenient (user can continue 
typing `;`).



================
Comment at: clang-tools-extra/clangd/CodeCompletionStrings.h:41
 ///   *Signature = "(size_type) const"
-///   *Snippet = "(${0:size_type})"
+///   *Snippet = "(${1:size_type})"
 /// If set, RequiredQualifiers is the text that must be typed before the name.
----------------
IIUC, I think we will still return `${0}` with the new behavior, `size_type` is 
the only placeholder here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62389



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to