The uncached lookup is mainly used in the ASTImporter/LLDB code-path
where we're not allowed to load from external storage. When importing
a FieldDecl with a DeclContext that had no external visible storage
(but came from a Clang module or PCH) the regular DeclContext::lookup
fails because:
- DeclContext::buildLookup doesn't set LookupPtr for decls that came from a module
- LLDB doesn't use the SharedImporterState
In such a case we would never continue with the "slow" path of iterating
through the decl chain on the DeclContext. In some cases this means that
ASTNodeImporter::VisitFieldDecl ends up importing a decl into the
DeclContext a second time.
The patch removes the short-circuit in the case where we don't find
any decls via the regular lookup.
Tests
- Un-skip the failing LLDB API tests
Could merge the two if-blocks now I suppose