<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;">
<p style="margin-top:0; margin-bottom:0">Hi!</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">I think the folding makes sense. My only concern was that the user could mistakenly think there are no overloads before choosing a completion item but I see in the screenshot that it is communicated with the [overloaded].
 Maybe as a bonus it could say how many overloads? i.e. [6 overloads] :) <br>
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Marc-André<br>
</p>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> clangd-dev <clangd-dev-bounces@lists.llvm.org> on behalf of Sam McCall via clangd-dev <clangd-dev@lists.llvm.org><br>
<b>Sent:</b> Friday, June 8, 2018 3:54:14 PM<br>
<b>To:</b> clangd-dev@lists.llvm.org<br>
<b>Subject:</b> [clangd-dev] Code completion overload folding</font>
<div> </div>
</div>
<meta content="text/html; charset=utf-8">
<div>
<div dir="ltr">What do we think about bundling overloaded functions into one completion item, vs clangd's current behavior of providing each overload of a function as a separate completion item?
<div><br>
</div>
<div>Off the top of my head, bundling pros:</div>
<div> - less noise</div>
<div> - present more diverse results</div>
<div>Bundling cons:</div>
<div> - lose the signature</div>
<div> - complicated interactions with e.g. include insertion</div>
<div><br>
</div>
<div>My own feeling is that bundling is a win on balance if the editor has good signature help support. This might be personal enough to make an option.</div>
<div><br>
</div>
<div>I built a hacky prototype if you want to play with this behavior: patch in <a href="https://reviews.llvm.org/D47957" id="LPlnk834980" class="OWAAutoLink" previewremoved="true">
https://reviews.llvm.org/D47957</a>.</div>
<div>Screenshot: <a href="https://i.imgur.com/vh25i20.png" id="LPlnk697150" class="OWAAutoLink" previewremoved="true">https://i.imgur.com/vh25i20.png</a></div>
<div><br>
</div>
<div>The behavior is to bundle together c++ method calls by name, and function calls by qualified name (namespaces must match). I don't know much about ObjC, I'm not sure if grouping on the first chunk of the selector would make sense.</div>
<div><br>
</div>
<div>Cool things you could do:</div>
<div> - pull individual elements out of the bundle if they're high ranking enough</div>
<div> - explode the bundle once the query is unambiguous (client-side filtering is a problem here)</div>
<div> - attempt to summarize similar signatures (e.g. show return type if it's the same for all overloads, show similar parts of const/non-const member overloads)</div>
<div><br>
</div>
</div>
</div>
</div>
</body>
</html>