================
@@ -2148,6 +2161,35 @@ void 
CXXRecordDecl::completeDefinition(CXXFinalOverriderMap *FinalOverriders) {
   for (conversion_iterator I = conversion_begin(), E = conversion_end();
        I != E; ++I)
     I.setAccess((*I)->getAccess());
+
+  ASTContext &Context = getASTContext();
+
+  if (isAggregate() && hasUserDeclaredConstructor() &&
+      !Context.getLangOpts().CPlusPlus20) {
+    // Diagnose any aggregate behavior changes in C++20
+    for (field_iterator I = field_begin(), E = field_end(); I != E; ++I) {
+      if (const auto *attr = I->getAttr<ExplicitInitAttr>()) {
----------------
AaronBallman wrote:

```suggestion
      if (const auto *AT = I->getAttr<ExplicitInitAttr>()) {
```
(`attr` doesn't match the naming conventions, but `Attr` is a type name, so 
just picked a name that met the usual coding style, feel free to rename to 
something better if you'd prefer.)

https://github.com/llvm/llvm-project/pull/102040
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to