[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.
----------------
a.sidorin wrote:
> 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.


http://reviews.llvm.org/D14326





More information about the cfe-commits mailing list