The qualified name can be used to match a completion item to its corresponding
symbol. This can be useful for tools that measure code completion quality.
Qualified names are not precise for identifying symbols; we need to figure out a
better way to identify completion items.
Details
Diff Detail
- Repository
- rCTE Clang Tools Extra
Event Timeline
| clangd/CodeComplete.cpp | ||
|---|---|---|
| 247 | can skip the bool() here if you like | |
| clangd/Protocol.h | ||
| 743 | So this is always set to scope + filterText (except for non-decl completions, where you're not setting it in this patch). WDYT about just making that "scope", and for now relying on the fact that scope + filtertext gives you a nice readable name? Advantages:
| |
- store scope in completion item. Add splitQualifiedName for NamedDecl.
| clangd/Protocol.h | ||
|---|---|---|
| 743 | Sounds good. Done. | |
| clangd/SourceCode.h | ||
|---|---|---|
| 60 ↗ | (On Diff #152331) | This is a bit non-orthogonal: the printing of the qname doesn't have much to do with splitting it. What about adding e.g. printQualifiedName to AST.h, and calling splitQualifiedName(printQualifiedName(ND))?( |
| unittests/clangd/CodeCompleteTests.cpp | ||
| 47 | maybe test scope explicitly/directly? | |
can skip the bool() here if you like