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



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

Reply via email to