[clang] [Clang] [Sema] Improve handling of multidimensional subscript operator for builtin types (PR #187828)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 24 10:55:04 PDT 2026
================
@@ -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]'.
----------------
Sirraide wrote:
Alright, I'll do that then
https://github.com/llvm/llvm-project/pull/187828
More information about the cfe-commits
mailing list