a_sidorin marked an inline comment as done. a_sidorin added inline comments.
================ Comment at: lib/AST/ASTImporter.cpp:1317 + for (auto *D : FromRD->decls()) { + Decl *ToD = Importer.GetAlreadyImportedOrNull(D); + assert(ToRD == ToD->getDeclContext() && ToRD->containsDecl(ToD)); ---------------- martong wrote: > Is it sure that `ToD` will never be a nullptr? > I think, `removeDecl` or `addDeclInternal` below may crash if we call it with > a nullptr. > Also in the assert, `ToD->getDeclContext()` seems achy if `ToD` is a nullptr. We have an early return if such import failed before (line 1300). Repository: rC Clang https://reviews.llvm.org/D44100 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits