[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 24 09:44:41 PDT 2019


martong marked 2 inline comments as done.
martong added inline comments.


================
Comment at: clang/lib/AST/ASTImporter.cpp:8647
-  assert(ImportDeclErrors.find(From) == ImportDeclErrors.end() &&
-         "Setting import error allowed only once for a Decl.");
   ImportDeclErrors[From] = Error;
----------------
balazske wrote:
> We should not remove this assert? (Or check if the error is the same, otherwise keep the first or last error? Normally if we set an error multiple times it should be the same error otherwise something is wrong with the import.)
Well, yes that is a good point. I was thinking about a theoretical scenario where we could set two different Errors for the same node, but failed to fabricate one. So I added an assert that they have the same kind,


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62375





More information about the cfe-commits mailing list