rsmith added inline comments.
================ Comment at: clang/lib/Sema/SemaChecking.cpp:732-733 + int RDKind = RD->isClass() ? 0 : (RD->isStruct() ? 1 : 2); + S.Diag(PtrArg->getBeginLoc(), diag::err_builtin_dump_struct_too_complex) + << RDKind << RD->getName(); + return ExprError(); ---------------- aaron.ballman wrote: > This will correctly handle diagnosing a gigantic anonymous struct. Producing an error here seems likely to eventually cause problems in practice for some users: people are using `__builtin_dump_struct` in generic code for reflection purposes, not just for debugging, and this will cause us to start rejecting complex generic code. Instead of rejecting, can we produce a tree of `PseudoObjectExpr`s if we have too many steps to store in a single expression? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158296/new/ https://reviews.llvm.org/D158296 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits