This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Allow symbols from AnyScope in dexp.
ClosedPublic

Authored by hokein on Nov 12 2018, 7:39 AM.

Details

Summary

We should allow symbols from any scope in dexp results, othewise
find StringRef doesn't return any results (llvm::StringRef).

Diff Detail

Repository
rL LLVM

Event Timeline

hokein created this revision.Nov 12 2018, 7:39 AM
ioeric added inline comments.Nov 12 2018, 7:46 AM
clangd/index/dex/dexp/Dexp.cpp
55 ↗(On Diff #173673)

I don't think you would want AnyScope here. For example, if QualifiedName is std::string, you can also get llvm::StringRef in the results.

138 ↗(On Diff #173673)

I think what you actually want is Request.AnyScope = Scopes.empty()? It doesn't seem useful to set AnyScope when scopes are provided.

hokein updated this revision to Diff 173676.Nov 12 2018, 8:01 AM
hokein marked 2 inline comments as done.

Address comments.

hokein added inline comments.Nov 12 2018, 8:01 AM
clangd/index/dex/dexp/Dexp.cpp
55 ↗(On Diff #173673)

Yeah, the input is required qualified name, I misthought that we can use unqualified name.

ioeric accepted this revision.Nov 12 2018, 8:03 AM
This revision is now accepted and ready to land.Nov 12 2018, 8:03 AM
This revision was automatically updated to reflect the committed changes.