[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 25 16:36:51 PDT 2024


bwendling wrote:

> As a matter of ensuring the behavior is predictable, I don't like IgnoreParenImpCasts(), and more generally looking through casts without checking the CastKind; it very easily leads to bugs because some casts have important semantics. Particularly lvalue-to-rvalue casts in this context.

Roger that. Some of the visitors are meant to completely ignore all casts. That's intentional. I want to get to the MemberExpr/DeclRefExpr to get its type. Casts only get in the way of that. Some discussion about why is here: https://github.com/llvm/llvm-project/issues/96737

https://github.com/llvm/llvm-project/pull/86858


More information about the cfe-commits mailing list