martong added inline comments.
Herald added a reviewer: martong.
Herald added a project: clang.


================
Comment at: lib/AST/ASTImporter.cpp:7767
+  if (!ToDCOrErr)
+    return ToDCOrErr.takeError();
+  auto *ToDC = cast<DeclContext>(*ToDCOrErr);
----------------
Actually, this patch is not merely a `Import` -> `Import_New` substitution. As 
this line shows, the error will be propagated correctly. However, in the old 
version we return with a nullptr DC which may be referenced later. This is the 
reason, why https://reviews.llvm.org/D59692 breaks in the unittests and thus 
depends on this patch.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55049/new/

https://reviews.llvm.org/D55049



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to