[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 17 08:35:42 PDT 2018
kadircet added inline comments.
================
Comment at: clangd/CodeComplete.cpp:1381
+ // Check whether function has any parameters or not.
+ LSP.textEdit->newText += SnippetSuffix.size() > 2 ? "(${0})" : "()";
+ }
----------------
ioeric wrote:
> I think we are missing one case here: `!EnableFunctionArgSnippets && (<not function or method>)`?
>
> I think we could do something like:
> ```
> if (!EnableFunctionArgSnippets && (<function or metrhod>))
> // Truncate parameter template
> else
> // append snippet like before
>
> ```
Thanks!
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50835
More information about the cfe-commits
mailing list