This is an archive of the discontinued LLVM Phabricator instance.

[ASTImporter] Remove redundant IsStructuralMatch overloads
ClosedPublic

Authored by teemperor on Oct 29 2021, 2:52 AM.

Details

Summary

Nearly all of the overloads have pretty much the same behaviour. The only exception here
is that some of them call back GetOriginalDecl and others don't, but the only real user
of that overload (which is LLDB) actually prefers getting this callback.

Diff Detail

Event Timeline

teemperor created this revision.Oct 29 2021, 2:52 AM
teemperor requested review of this revision.Oct 29 2021, 2:52 AM
teemperor added inline comments.Oct 29 2021, 2:54 AM
clang/lib/AST/ASTImporter.cpp
2179

(Importer.getToContext is actually not the ASTContext of To, so this technically can lead to creating types in the wrong ASTContext. I'll fix that in a follow-up either by changing this or removing the GetOriginalDecl above).

2185

Will turn that into a generic IsStructurallyEquivalent overload as a separate follow-up

martong accepted this revision.Oct 29 2021, 3:14 AM

Makes sense! Thanks!

clang/lib/AST/ASTImporter.cpp
2179

uhh, okay.

This revision is now accepted and ready to land.Oct 29 2021, 3:14 AM

Makes sense! Thanks!

Thanks for the quick review!

This revision was landed with ongoing or failed builds.Oct 29 2021, 3:23 AM
This revision was automatically updated to reflect the committed changes.