This is an archive of the discontinued LLVM Phabricator instance.

[ASTImporter] Support importing UnresolvedLookupExpr nodes
Needs RevisionPublic

Authored by khazem on Nov 22 2016, 8:02 PM.

Details

Summary

This patch adds support for importing AST nodes of type UnresolvedLookupExpr, as well as a test for such an import. This resolves an issue where attempting to import UnresolvedLookupExprs would cause Clang to error out with "cannot import unsupported AST node UnresolvedLookupExpr".

This patch depends on D26904.

Diff Detail

Event Timeline

khazem updated this revision to Diff 79019.Nov 22 2016, 8:02 PM
khazem retitled this revision from to [ASTImporter] Support importing UnresolvedLookupExpr nodes.
khazem updated this object.
khazem added reviewers: spyffe, dergachev.a.
khazem added subscribers: cfe-commits, phosek, seanklein.
a.sidorin requested changes to this revision.Nov 23 2016, 2:15 AM
a.sidorin added a reviewer: a.sidorin.

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

lib/AST/ASTImporter.cpp
6492

auto will look nice here.

6501

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.

6502

QualifierLoc needs to be imported: it may refer to decls in the "from" context.

This revision now requires changes to proceed.Nov 23 2016, 2:15 AM
spyffe edited edge metadata.Nov 28 2016, 1:51 PM

I only have a stylistic nit to add to Aleksei's comments.

lib/AST/ASTImporter.cpp
6492

Alternatively,

for (Decl *D : E->decls())

Marked the place I was talking about in D27181

lib/AST/ASTImporter.cpp
6489

Commented in D27181 that usage of ImportDeclarationNameLoc look different in different places.

dkrupp added a subscriber: dkrupp.Jul 17 2017, 4:29 AM