[PATCH] D158296: [clang] Diagnose overly complex Record in __builtin_dump_struct
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 30 10:55:15 PDT 2023
aaron.ballman added a comment.
The changes generally LGTM, thank you!
================
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();
----------------
This will correctly handle diagnosing a gigantic anonymous struct.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158296/new/
https://reviews.llvm.org/D158296
More information about the cfe-commits
mailing list