[all-commits] [llvm/llvm-project] 57caad: [MSVC] Allow declaration of multi-dim 'property' a...

Mike Rice via All-commits all-commits at lists.llvm.org
Wed Apr 5 10:30:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 57caadc57a30f2279099e5b86bb555b4aab621ce
      https://github.com/llvm/llvm-project/commit/57caadc57a30f2279099e5b86bb555b4aab621ce
  Author: Mike Rice <michael.p.rice at intel.com>
  Date:   2023-04-05 (Wed, 05 Apr 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Sema/ParsedAttr.h
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaType.cpp
    M clang/test/CodeGenCXX/ms-property.cpp
    M clang/test/SemaCXX/ms-property-error.cpp
    M clang/test/SemaCXX/ms-property.cpp

  Log Message:
  -----------
  [MSVC] Allow declaration of multi-dim 'property' array fields

MSVC allows declaration of multi-dim arrays like this:

__declspec(property(get=GetX, put=PutX)) int x[][][];

This syntax can appear in generated typelib headers.

Currently clang errors on declarators like this since it forms an array
type of incomplete array. Rather than try to handle such a type, ignore
adjacent empty chunks so this is treated as if there was only one empty
array chunk (i.e. int x[]).

The functionality to handle multi-dim subscripts of property fields
already works, but only if declared as a single-dim array.




More information about the All-commits mailing list