================
@@ -19758,6 +20083,28 @@ void Sema::ActOnFields(Scope *S, SourceLocation
RecLoc, Decl *EnclosingDecl,
}
}
+ // Transform types with late-parsed type attributes.
+ // Late-parsed type attributes are stored as placeholder LateParsedAttrType
+ // nodes. We need to transform them into proper attributed types now that
+ // all fields are visible and can be referenced.
+ // This is only enabled when -fexperimental-late-parse-attributes is set
+ // If late parsing here only if it's top-level record type. Otherwise, wait
+ // until struct declaration is.
+ // if (getLangOpts().ExperimentalLateParseAttributes &&
+ // !EnclosingDecl->getDeclContext()->isRecord()) {
+ // ProcessLateParsedTypeAttributes(Fields);
+ // }
+
+ // Perform FieldDecl-dependent validation for counted_by family attributes
+ for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end();
+ i != end; ++i) {
----------------
zmodem wrote:
nit: could be a range-for? `for (Decl *D : Fields)`?
https://github.com/llvm/llvm-project/pull/179612
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits