This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG25ac078a961d: [clang][ASTImporter] Add isNewDecl (authored
by martong).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
martong updated this revision to Diff 429212.
martong added a comment.
- setNewDecl -> markAsNewDecl
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123685/new/
https://reviews.llvm.org/D123685
Files:
martong marked 4 inline comments as done.
martong added inline comments.
Comment at: clang/include/clang/AST/ASTImporterSharedState.h:83
+
+ void setNewDecl(Decl *ToD) { NewDecls.insert(ToD); }
};
`markAsNewDecl` sounds better, I'll update before commit.
xazax.hun accepted this revision.
xazax.hun added a comment.
This revision is now accepted and ready to land.
Thanks, this looks good to me!
Comment at: clang/include/clang/AST/ASTImporterSharedState.h:43
+ /// Set of the newly created declarations.
+ llvm::DenseSet
martong marked 4 inline comments as done.
martong added a comment.
@xazax.hun Hey Gabor, thanks a lot for your time and effort for reviewing this
patch set!
(And of course thank you for you too @steakhal, but you've already seen most of
it.)
In D123685#3458329
xazax.hun added inline comments.
Comment at: clang/include/clang/AST/ASTImporterSharedState.h:43
+ /// Set of the newly created declarations.
+ llvm::DenseSet NewDecls;
+
ASTImporter already has something like `ImportedFromDecls`. Is that not
sufficient to
steakhal added inline comments.
Comment at: clang/include/clang/AST/ASTImporterSharedState.h:69-75
llvm::Optional getImportDeclErrorIfAny(Decl *ToD) const {
auto Pos = ImportErrors.find(ToD);
if (Pos != ImportErrors.end())
return Pos->second;
else
steakhal added a comment.
What happens if the import fails? Or alternatively the
`InitializeImportedDecl(FromD, ToD)` fails?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123685/new/
https://reviews.llvm.org/D123685
martong created this revision.
martong added reviewers: balazske, steakhal.
Herald added subscribers: gamesh411, Szelethus, dkrupp, rnkovacs.
Herald added a reviewer: a.sidorin.
Herald added a reviewer: shafik.
Herald added a project: All.
martong requested review of this revision.
Herald added a