ioeric added inline comments.
================ Comment at: clangd/CodeComplete.cpp:1379 + Kind == CompletionItemKind::Method) && + SnippetSuffix.front() == '(' && SnippetSuffix.back() == ')') { + // Check whether function has any parameters or not. ---------------- nit: add parentheses around `(... == ...)` ================ Comment at: clangd/CodeComplete.cpp:1380 + SnippetSuffix.front() == '(' && SnippetSuffix.back() == ')') { + // Check whether function has any parameters or not. + LSP.textEdit->newText += SnippetSuffix.size() > 2 ? "(${0})" : "()"; ---------------- nit: no braces around one liner. ================ Comment at: clangd/CodeComplete.cpp:1381 + // Check whether function has any parameters or not. + LSP.textEdit->newText += SnippetSuffix.size() > 2 ? "(${0})" : "()"; + } ---------------- 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 ``` Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50835 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits