[PATCH] D62373: [ASTImporter] Store import errors for Decls
Aleksei Sidorin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun May 26 12:49:25 PDT 2019
a_sidorin added a comment.
Hi Gabor,
The idea looks fine to me, but I have some questions inline.
================
Comment at: clang/lib/AST/ASTImporter.cpp:5109
} else { // ODR violation.
// FIXME HandleNameConflict
+ return make_error<ImportError>(ImportError::NameConflict);
----------------
Is this FIXME obsolete now?
================
Comment at: clang/lib/AST/ASTImporter.cpp:7823
+ auto Pos = ImportedDecls.find(FromD);
+ if (Pos != ImportedDecls.end()) {
+ // Import failed after the object was created.
----------------
I see the enabled test case, but does it cover the logic in this block?
================
Comment at: clang/lib/AST/ASTImporter.cpp:7851
+ if (!getImportDeclErrorIfAny(FromD)) {
+ // Error encountered for the first time.
+ // After takeError the error is not usable any more in ToDOrErr.
----------------
Is it possible to get this error more than once?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62373/new/
https://reviews.llvm.org/D62373
More information about the cfe-commits
mailing list