This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Penalize file-scope symbols in the ranking for non-completion queries
ClosedPublic

Authored by nridge on Jan 13 2019, 3:38 PM.

Diff Detail

Event Timeline

nridge created this revision.Jan 13 2019, 3:38 PM
sammccall accepted this revision.Jan 14 2019, 3:16 AM
sammccall added inline comments.
clang-tools-extra/clangd/Quality.cpp
289 ↗(On Diff #181487)

(needs update after I inverted this flag to VisibleOutsideFile, sorry!)

385 ↗(On Diff #181487)

I'd suggest being a bit more aggressive here: 0.5 or 0.4. Just guessing though, up to you.

clang-tools-extra/unittests/clangd/QualityTests.cpp
104 ↗(On Diff #181487)

can you add a main-file symbol here, and verify the scope property gets set on the SymbolRelevanceSignals correctly?

This revision is now accepted and ready to land.Jan 14 2019, 3:16 AM
nridge updated this revision to Diff 181920.Jan 15 2019, 4:12 PM

Address review comments

nridge added a comment.EditedJan 18 2019, 11:08 AM

@sammccall, could you commit this patch for me? Thank you!

Friendly reminder than this is ready to be committed :)

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2019, 5:07 AM

Friendly reminder than this is ready to be committed :)

Sorry, I lost track of this. Landed now. Thanks again!