[PATCH] D13336: [MSVC] 'property' with an empty array in array subscript expression.

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 04:00:27 PDT 2015


ABataev created this revision.
ABataev added a reviewer: rnk.
ABataev added a subscriber: cfe-commits.

MSVC supports 'property' attribute and allows to apply it to the declaration of an empty array in a class or structure definition.
For example:
```
__declspec(property(get=GetX, put=PutX)) int x[];
```
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);

http://reviews.llvm.org/D13336

Files:
  include/clang/Sema/Sema.h
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaPseudoObject.cpp
  test/CodeGenCXX/ms-property.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13336.36215.patch
Type: text/x-patch
Size: 4709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151001/2c17220a/attachment.bin>


More information about the cfe-commits mailing list