<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Jun 11, 2018 at 3:32 PM Marc-André Laperle <<a href="mailto:marc-andre.laperle@ericsson.com">marc-andre.laperle@ericsson.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
Hi Sam!<br>
I think completing macros is useful so I would say A would not be good. I think B sounds good for the short/medium term.</div></blockquote><div>Agreed on both counts here. I actually landed a patch for B as it seemed like such a clear win. If it's causing problems for anyone happy to revert.</div><div>(One possibility is windows devs: apparently API calls like CreateFile are macros that point to the A/W string variants)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>I’d like to eventually come up with a proposal of what to truncate, because I see results that are every unlikely to match the user intention.
 For example, not showing strtod and CLONE_CHILD_SETTID. But I don’t know enough about how this is implemented to make a concrete proposal.<br></div></blockquote><div>I noticed this too, can you try <a href="https://reviews.llvm.org/D47950">https://reviews.llvm.org/D47950</a> and see how it feels? I think this is the right fix for that problem.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<br>
Cheers,<br>
Marc-André
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-434944266704375714divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> clangd-dev <<a href="mailto:clangd-dev-bounces@lists.llvm.org" target="_blank">clangd-dev-bounces@lists.llvm.org</a>> on behalf of Sam McCall via clangd-dev <<a href="mailto:clangd-dev@lists.llvm.org" target="_blank">clangd-dev@lists.llvm.org</a>><br>
<b>Sent:</b> Friday, June 8, 2018 6:21:58 AM<br>
<b>To:</b> <a href="mailto:clangd-dev@lists.llvm.org" target="_blank">clangd-dev@lists.llvm.org</a><br>
<b>Subject:</b> [clangd-dev] Completion list spam and macros</font>
<div> </div>
</div>

<div>
<div dir="ltr">So code completion has lots of irrelevant results :-)<br>
<div><br>
</div>
<div>Macros seem to be the worst offenders. We're doing a better job of downranking them, but it still means that the result list is *always* long:</div>
<div>  <a href="https://i.imgur.com/gRZl0PZ.png" target="_blank">https://i.imgur.com/gRZl0PZ.png</a></div>
<div>We currently don't index macros and I'm scared that doing so would make this problem worse.</div>
<div><br>
</div>
<div>What do people think about these ideas (not alternatives, we could try several):</div>
<div>A) not completing macros at all, ever</div>
<div>B) completing macros only for case-insensitive prefix matches (not fuzzy)</div>
<div>C) tightening the word segmentation aspects of fuzzy matching (for all symbols) so this stuff doesn't match</div>
<div>D) tightening the case-matching aspects of fuzzy matching (for all symbols) so this stuff doesn't match</div>
<div>E) trying to identify the boundary between goodish results and bad results, and truncating the list there? (This will require disabling client-side filtering)</div>
<div>F) ignoring this problem as long as good results aren't being buried under the bad ones?</div>
<div><br>
</div>
<div>(I'll send a patch shortly for B which seems like an easy win to me, please try it out and we can revert if it's terrible)</div>
</div>
</div>
</div>

</blockquote></div></div>