sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:484
+      S.Signature = RemoveFirstTemplateArg(S.Signature);
+      S.SnippetSuffix = RemoveFirstTemplateArg(S.SnippetSuffix);
+    }
----------------
massberg wrote:
> sammccall wrote:
> > maybe leave a comment:
> > 
> > // dropping the first placeholder from the suffix will leave a `$2` with no 
> > `$1`.
> > // However, editors appear to deal with this OK.
> > 
> > (assuming you've tested this in vscode)
> Yes I've tested it with vscode and it looks fine. Why is the numbering of the 
> parameters required?
The numbering defines the logical sequence, in practice which placeholder will 
be selected first, and the order that pressing `<tab>` will visit the others in.

I guess this could make sense when they're not parameters but some other 
snippet placeholders, but honestly this seems more confusing than useful, I'd 
prefer they were un-numbered and always LTR.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154450

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

Reply via email to