[Lldb-commits] [PATCH] D68464: [lldb][modern-type-lookup] Ask the ExternalASTMerger to lookup namespaces instead of using the old mechanism

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 4 06:50:44 PDT 2019

teemperor created this revision.
teemperor added a reviewer: shafik.
Herald added subscribers: lldb-commits, JDevlieghere.
Herald added a project: LLDB.

With this patch LLDB starts querying the ExternalASTMerger when we look up a namespace in the translation unit context. Because
Clang's FindExternalVisibleDecls is returning a true/false on Lookup and LLDB instead uses a list of decls, this also adds some
glue code that passes this bool back to the caller when we have modern-type-lookup activated. We can't easily emulate
LLDB's API as Clang doesn't directly tell us what declarations it found in the DeclContext and querying the decl context for potential
declarations could have side-effects (like modifying the cached lookup in some way).

Note that this doesn't change any code for normal LLDB as we continue to ignore that return value in normal LLDB (mostly because
I don't know if there is a reason this was implemented this way).

The bigger change in ClangExpressionDeclMap.cpp is necessary as currently never query the ExternalASTSource when we don't
have a NamespaceMap (which we never have, as that's a non-modern-type-lookup thing). So instead we just ignore the NameSpaceMap
and continue to the actual ExternalASTSource in this case.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68464.223207.patch
Type: text/x-patch
Size: 9422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191004/3aef19c3/attachment.bin>

More information about the lldb-commits mailing list