[clang] [C23] Implement WG14 N3037 (PR #132939)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 7 09:56:55 PDT 2025
================
@@ -450,6 +453,41 @@ class StmtComparer {
};
} // namespace
+static bool
+CheckStructurallyEquivalentAttributes(StructuralEquivalenceContext &Context,
+ const Decl *D1, const Decl *D2,
+ const Decl *PrimaryDecl = nullptr) {
+ // If either declaration has an attribute on it, we treat the declarations
+ // as not being structurally equivalent.
+ // FIXME: this should be handled on a case-by-case basis via tablegen in
+ // Attr.td. There are multiple cases to consider: one declation with the
+ // attribute, another without it; different attribute syntax|spellings for
+ // the same semantic attribute, differences in attribute arguments, order
+ // in which attributes are applied, how to merge attributes if the types are
+ // structurally equivalent, etc.
+ const Attr *D1Attr = nullptr, *D2Attr = nullptr;
----------------
AaronBallman wrote:
Yeah, I think we should just hold off until we're ready to bite the bullet and do it properly.
https://github.com/llvm/llvm-project/pull/132939
More information about the cfe-commits
mailing list