================ @@ -474,6 +477,17 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) { for (DeclContext::decl_iterator D = DC->decls_begin(), DEnd = DC->decls_end(); D != DEnd; ++D) { + // Print enum members and public struct fields when + // PrintTagTypeContents=true. Only applicable when TerseOutput=true since + // otherwise all members are printed. + if (Policy.TerseOutput) { + assert(Policy.PrintTagTypeContents); + if (!(isa<EnumConstantDecl>(*D) || + (isa<FieldDecl>(*D) && + dyn_cast<FieldDecl>(*D)->getAccess() == AS_public))) ---------------- zyn0217 wrote:
Do you have any tests on C codes? Looking around the codebase, I think `AS_none` *might* be used in some cases wrt non-C++ codes? https://github.com/llvm/llvm-project/pull/89557 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits