[PATCH] D140915: [clangd] Fix getQueryScopes for using-directive with inline namespace
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 6 00:44:07 PST 2023
kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:675
+ std::vector<std::string> EnclosingAtFront;
+ if (EnclosingNamespace.has_value()) {
+ EnclosingAtFront.push_back(*EnclosingNamespace);
----------------
nit: you can drop the braces
================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1719
+ });
+ llvm::copy_if(SpecifiedScopes.scopesForQualification(),
+ std::back_inserter(AccessibleScopes),
----------------
tom-anders wrote:
> kadircet wrote:
> > `AccessibleScopes` doesn't need any particular ordering. we can use `scopesForQualification` as-is.
> Might as well just make it a std::set instead of std::vector?
let's leave it as-is for now. i feel like this part can benefit from a bigger refactoring going forward and thinking about vectors is easier then having a bunch of references or sets.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140915/new/
https://reviews.llvm.org/D140915
More information about the cfe-commits
mailing list