[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6f1a56d37ac6: [clangd] Enable partial namespace matches for workspace symbols (authored by kadircet). Repository: rG LLVM Github Monorepo

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 297142. kadircet marked an inline comment as done. kadircet added a comment. - Move if checks into asserts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88814/new/ https://reviews.llvm.org/D88814 Files:

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. Yeah, we can fairly easily make this tighter if it's noisy. My suspicion is people will rather complain about ranking than these results being totally irrelevant. Nice that we now have workspace/symbols users that can send this

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:44 +// Returns true if \p Query can be found as a sub-scope inside \p Scope. +bool approximateScopeMatch(llvm::StringRef Scope, sammccall wrote: > kadircet wrote: > >

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 296992. kadircet marked 3 inline comments as done. kadircet added a comment. - Switch from substring to subscope matching. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88814/new/

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:44 +// Returns true if \p Query can be found as a sub-scope inside \p Scope. +bool approximateScopeMatch(llvm::StringRef Scope, kadircet wrote: > sammccall wrote: > > I had a

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:44 +// Returns true if \p Query can be found as a sub-scope inside \p Scope. +bool approximateScopeMatch(llvm::StringRef Scope, sammccall wrote: > I had a little trouble

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:44 +// Returns true if \p Query can be found as a sub-scope inside \p Scope. +bool

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 296402. kadircet marked 6 inline comments as done. kadircet added a comment. - Perform sub-scope matching rather than substring match for partial namespaces. - Apply a penalty for partially matching namespaces. Repository: rG LLVM Github Monorepo

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:74 auto Names = splitQualifiedName(Query); Add a comment here (or elsewhere, I guess) about how qualified names are handled. - exact namespace: boosted on the index

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. This will enable queries like "clangd::" to find symbols under clangd namespace,