This is an archive of the discontinued LLVM Phabricator instance.

[ASTImporter] Propagate errors during import of overridden methods.
ClosedPublic

Authored by balazske on Aug 29 2019, 2:56 AM.

Details

Summary

If importing overridden methods fails for a method it can be seen
incorrectly as non-virtual. To avoid this inconsistency the method
is marked with import error to avoid later use of it.

Diff Detail

Repository
rL LLVM

Event Timeline

balazske created this revision.Aug 29 2019, 2:56 AM
martong accepted this revision.Aug 29 2019, 5:28 AM
martong added a reviewer: a_sidorin.

LGTM, other than a few comments.

clang/lib/AST/ASTImporter.cpp
7809 ↗(On Diff #217807)

I think this is the time to change the name of this function. In fact, we import the overridden methods and not the ones which override this function.
So, I suggest this rename: ImportOverrides -> ImportOverriddenMethods

clang/unittests/AST/ASTImporterTest.cpp
5222 ↗(On Diff #217807)

Perhaps we should check the error here is UnsupportedConstruct too.

This revision is now accepted and ready to land.Aug 29 2019, 5:28 AM
shafik accepted this revision.Aug 29 2019, 9:40 PM

LGTM but I agree w/ Gabor's comments

balazske updated this revision to Diff 218039.Aug 30 2019, 1:57 AM
  • Renamed ImportOverrides, additional check in test.
balazske marked 2 inline comments as done.Aug 30 2019, 3:09 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2019, 3:11 AM