[clang] [C23] Implement WG14 N3037 (PR #132939)

via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 26 02:56:07 PDT 2025


================
@@ -1454,6 +1567,12 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
                                      QualType Owner2Type) {
   const auto *Owner2 = cast<Decl>(Field2->getDeclContext());
 
+  // In C23 mode, check for structural equivalence of attributes on the fields.
+  // FIXME: Should this happen in C++ as well?
----------------
cor3ntin wrote:

Can we get there in C++ at all? I wonder if you could assert the language mode is C
In C++ equivalence of types is limited https://eel.is/c++draft/temp.type


https://github.com/llvm/llvm-project/pull/132939


More information about the cfe-commits mailing list