[PATCH] D51633: [ASTImporter] Added error handling for AST import.
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 15 04:01:43 PDT 2018
balazske marked 9 inline comments as done.
balazske added inline comments.
================
Comment at: lib/AST/ASTImporter.cpp:2683
+ continue;
+ } else if (isa<ValueDecl>(Found))
+ continue;
----------------
a_sidorin wrote:
> Same here.
I do not know exactly why this was made, it looks like a bugfix for a problem encountered during the tests. Maybe I can undo this change (there are other related problem fixes so this is probably not needed).
================
Comment at: lib/AST/ASTImporter.cpp:4604
+ if (Error Err = ImportDeclContext(D))
+ // FIXME: Really ignore the error?
+ consumeError(std::move(Err));
----------------
a_sidorin wrote:
> I think we can just `return std::move(Err);` as it was done below.
Changed to return the error.
================
Comment at: lib/AST/ASTImporter.cpp:5657
+ if (!ToSemiLocOrErr)
+ return nullptr;
+ return new (Importer.getToContext()) NullStmt(
----------------
a_sidorin wrote:
> Shouldn't we return an error here?
Good catch, this looks like the change was missed.
Repository:
rC Clang
https://reviews.llvm.org/D51633
More information about the cfe-commits
mailing list