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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to