================
@@ -5146,13 +5147,20 @@ ExprResult Sema::ActOnArraySubscriptExpr(Scope *S, Expr
*base,
// The above statement indicates that x[] can be used with one or more array
// indices. In this case, i=p->x[a][b] will be turned into i=p->GetX(a, b),
// and p->x[a][b] = i will be turned into p->PutX(a, b, i);
+ //
+ // Since C++23, MSVC accepts multiple arguments; e.g. given
+ //
+ // struct S {
+ // int get_x(int, int);
+ // __declspec(property(get=get_x)) int x[][];
+ // };
+ //
+ // MSVC accepts both 'S().x[1][2]' and 'S().x[1, 2]'.
----------------
AaronBallman wrote:
My intuition is to disable multidimensional array properties entirely until we
have someone willing to dedicate the effort to fully supporting what Microsoft
does for it; there's a lot about this feature which is "organic behavior" (not
just multidimensional array behavior) and the functionality isn't heavily used
in practice (particularly given that there are much better approaches in C++).
https://github.com/llvm/llvm-project/pull/187828
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits