[PATCH] D27033: [ASTImporter] Support importing UnresolvedLookupExpr nodes

Aleksei Sidorin via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 23 02:15:29 PST 2016


a.sidorin requested changes to this revision.
a.sidorin added a reviewer: a.sidorin.
a.sidorin added a comment.
This revision now requires changes to proceed.

Hi Kareem! I'll be happy to see this changes in upstream. Please see my comments inline.



================
Comment at: lib/AST/ASTImporter.cpp:6492
+  UnresolvedSet<8> ToDecls;
+  for (UnresolvedLookupExpr::decls_iterator S = E->decls_begin(),
+                                            F = E->decls_end();
----------------
`auto` will look nice here.


================
Comment at: lib/AST/ASTImporter.cpp:6501
+
+  return UnresolvedLookupExpr::Create(Importer.getToContext(), NamingClass,
+                                      E->getQualifierLoc(), NameInfo,
----------------
UnresolvedLookupExpr::Create is overloaded for different use cases and it seems like some of them are not covered here. You may refer to https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/AST/ASTImporter.cpp#L7499 for some implementation details.


================
Comment at: lib/AST/ASTImporter.cpp:6502
+  return UnresolvedLookupExpr::Create(Importer.getToContext(), NamingClass,
+                                      E->getQualifierLoc(), NameInfo,
+                                      E->requiresADL(), E->isOverloaded(),
----------------
QualifierLoc needs to be imported: it may refer to decls in the "from" context.


https://reviews.llvm.org/D27033





More information about the cfe-commits mailing list