This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Penalize destructor and overloaded operators in code completion.
ClosedPublic

Authored by ioeric on Nov 29 2018, 9:40 AM.

Diff Detail

Event Timeline

ioeric created this revision.Nov 29 2018, 9:40 AM
hokein accepted this revision.Nov 30 2018, 2:00 AM
hokein added inline comments.
clangd/Quality.h
74

Maybe name it OverloadedOperator to avoid confusion with other non-overloaded operators like ?:

unittests/clangd/QualityTests.cpp
428

The test name *Quality is a bit confusing. At the first glance, I'd expect to see some tests about ranking, but it just verifies that the new symbol category is added, maybe name it something like OperatorSymbolCategory.

This revision is now accepted and ready to land.Nov 30 2018, 2:00 AM
ioeric updated this revision to Diff 176075.Nov 30 2018, 3:18 AM
ioeric marked an inline comment as done.
  • Rename test name.
clangd/Quality.h
74

Ternary operator is not a symbol AFAIK? It's an expression. Even if it's an operator, I think we would still want to categorize it as operator.

This revision was automatically updated to reflect the committed changes.