[PATCH] D55049: Changed every use of ASTImporter::Import to Import_New

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 22 05:54:24 PDT 2019


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





More information about the cfe-commits mailing list