[PATCH] D149981: [clang][AST][NFC] Factor out check for structural equivalence of names.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 8 10:25:35 PDT 2023
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM! I'll fix up the nits when I land on your behalf.
================
Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:1456-1467
+static bool NameIsStructurallyEquivalent(const TagDecl &D1, const TagDecl &D2) {
+ auto GetName = [](const TagDecl &D) -> const IdentifierInfo * {
+ if (const IdentifierInfo *Name = D.getIdentifier()) {
+ return Name;
+ }
+ if (const TypedefNameDecl *TypedefName = D.getTypedefNameForAnonDecl()) {
+ return TypedefName->getIdentifier();
----------------
Minor nits for our weird coding style.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149981/new/
https://reviews.llvm.org/D149981
More information about the cfe-commits
mailing list