[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 18:00:43 PST 2017


arphaman added a comment.

In https://reviews.llvm.org/D40562#940201, @ilya-biryukov wrote:

> In https://reviews.llvm.org/D40562#939950, @arphaman wrote:
>
> > This change breaks cached completions for declarations in namespaces in libclang. What exactly are you trying to achieve here? We could introduce another flag maybe.
>
>
> Am I right to assume this cache is there to reduce the amount of `Decl`s we need to deserialize from `Preamble`s? Maybe we could fix the cache to also include namespace-level `Decl`s? It should improve performance of the cached completions.


I'm not actually 100% sure, but I would imagine that this one of the reasons, yes. It would be nice to improve the cache to have things like namespace-level `Decl`, although how will lookup work in that case? Btw, do you think the cache can be reused in clangd as well?

> But for a quick workaround we could introduce a separate flag.


https://reviews.llvm.org/D40562





More information about the cfe-commits mailing list