[PATCH] D14326: ASTImporter: expressions, pt.2
Aleksei Sidorin via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 1 02:09:27 PDT 2016
a.sidorin marked 2 inline comments as done.
Comment at: lib/AST/ASTImporter.cpp:3363
@@ +3362,3 @@
+ // Determine whether we've already imported this decl.
+ // FriendDecl is not a NamedDecl so we cannot use localUncachedLookup.
> sepavloff wrote:
> > Maybe it is more natural to put this check into `bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2)`? If records are equivalent, existing decl can be used as a result of import, if not - entire record must be recreated anyway.
> Sorry, it seems like I don't completely understand your idea. Won't `IsStructurallyEquivalent()` do an additional amount of work?
And also, even if they are equivalent, we should search for the equivalent FriendDecl to return it.
More information about the cfe-commits