This is an archive of the discontinued LLVM Phabricator instance.

[clang][AST][NFC] Factor out check for structural equivalence of names.
ClosedPublic

Authored by davidstone on May 5 2023, 12:26 PM.

Details

Summary

We have four places that we try to decide which name to use for the test for structural equivalence, and in each of those we evaluate getTypedefNameForAnonDecl twice. Pull out the check into a function to reduce duplication and evaluate things only once.

Diff Detail

Event Timeline

davidstone created this revision.May 5 2023, 12:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2023, 12:26 PM
Herald added a subscriber: martong. · View Herald Transcript
davidstone requested review of this revision.May 5 2023, 12:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2023, 12:26 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman accepted this revision.May 8 2023, 10:25 AM
aaron.ballman added a subscriber: aaron.ballman.

LGTM! I'll fix up the nits when I land on your behalf.

clang/lib/AST/ASTStructuralEquivalence.cpp
1456–1467

Minor nits for our weird coding style.

This revision is now accepted and ready to land.May 8 2023, 10:25 AM
This revision was landed with ongoing or failed builds.May 8 2023, 10:28 AM
This revision was automatically updated to reflect the committed changes.