[PATCH] D145093: Add map info for dereference pointer.

Jennifer Yu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 2 08:57:03 PST 2023


jyu2 added a comment.

> I mean we shall emit the same mapping for `(*a)[:3]` and for `a[0][:3]`

Yes I mean emit (*a)[:3] as a[0][:3]

The difficulty is during the process array section of 
OMPArraySectionExpr 0x12aa37e0 '<OpenMP array section type>' lvalue

| -ImplicitCastExpr 0x12a8a918 'int *' <ArrayToPointerDecay> |
| `-ArraySubscriptExpr 0x12a8a8d8 'int[3]':'int[3]' lvalue   |
|                                                            | -ImplicitCastExpr 0x12a8a8c0 'int (*)[3]' <LValueToRValue>                       |
|                                                            | `-DeclRefExpr 0x12a8a880 'int (*)[3]' lvalue ParmVar 0x12a8a000 'a' 'int (*)[3]' |
| `-IntegerLiteral 0x12a8a8a0 'int' 0                        |
| -<<<NULL>>>                                                |
| -IntegerLiteral 0x12a8a8f8 'int' 3                         |
|

`-<<<NULL>>>

It is not easy to set section base as a[0].


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145093/new/

https://reviews.llvm.org/D145093



More information about the cfe-commits mailing list