[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 29 12:15:35 PST 2023


efriedma-quic wrote:

CodeGenFunction::FindCountedByField finds a field with a corresponding base expression.  Currently, it throws away the base expression.  And the code you've just written tries to recompute the base.  Instead of doing this dance, can we just make CodeGenFunction::FindCountedByField return both the field and the base expression?

I'm extremely suspicious of the way MemberExprBaseVisitor works; it's basically never right in CodeGen to treat all CastExprs the same way, or handles MemberExprs without checking isArrow().

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


More information about the cfe-commits mailing list