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

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 29 15:15:51 PST 2023


bwendling wrote:

Okay. With the latest commit, I handle some of the weird accesses. As it turns out, looking at `isArrow()` for a `MemberExpr` isn't going to work, because it'll happen with ordinary accesses:

```
ImplicitCastExpr 0x564fa8c3fd48 'int *' <ArrayToPointerDecay>
`-MemberExpr 0x564fa8c3fcf8 'int[]' lvalue .arr 0x564fa8c2f488
  `-MemberExpr 0x564fa8c3fcc8 'struct S' lvalue ->s 0x564fa8c3f928
    `-ImplicitCastExpr 0x564fa8c3fcb0 'struct SS *' <LValueToRValue>
      `-DeclRefExpr 0x564fa8c3fc90 'struct SS *' lvalue ParmVar 0x564fa8c3fab8 's' 'struct SS *'
; ModuleID = '/home/morbo/llvm/ugh.c'
```

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


More information about the cfe-commits mailing list