r.stahl added inline comments.
================ Comment at: lib/AST/ASTImporter.cpp:2139 + CXXRecordDecl *Injected = nullptr; + for (NamedDecl *Found : D2CXX->noload_lookup(Name)) { + auto *Record = dyn_cast<CXXRecordDecl>(Found); ---------------- balazske wrote: > r.stahl wrote: > > The only thing I'm wondering is whether the Decls looked up here are always > > known to be already imported. > These are in the 'To' context. It may be that the `Injected` is not found > here, probably because not yet imported (in this case the import may be part > of a not completed recursive process). As far as I understand that corner case could be covered by doing the lookup on `DCXX` instead and then importing the injected decl. But then you wouldn't find it if it is only in the To context (if that is possible). I mean if a user calls ImportDecl in another order specifically. But such a case is probably really artificial and I'm not sure if it's even makes sense or is already covered by ImportDeclParts. It should be fine as it is. Repository: rC Clang https://reviews.llvm.org/D47450 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits