[PATCH] D104285: [analyzer][AST] Retrieve value by direct index from list initialization of constant array declaration.
Denys Petrov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 30 07:58:33 PDT 2021
ASDenysPetrov added a comment.
In D104285#2972215 <https://reviews.llvm.org/D104285#2972215>, @martong wrote:
> @ASDenysPetrov Denis, do you think it would make sense to handle the non-multi-dimensional cases first? I see that you have useful patches in the stack that depends on this change (i.e handling a StringLiteral or a CompoundLiteralExpr) but perhaps they would be meaningful even without solving the mult-array case here (?).
I think you are right. I've been wandering the Standards for a week. I can't find the proof whether it is even a legal cast or not `const int arr[1][2][3]; const int ptr* = (const int*)arr;`. Descriptions about this are really unclear.
I'll try to rewrite this patch for simple-dimensional arrays for a start.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104285/new/
https://reviews.llvm.org/D104285
More information about the cfe-commits
mailing list