[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 27 09:35:00 PST 2024


mahtohappy wrote:

    // If no array size was specified, but the new expression was
    // instantiated with an array type (e.g., "new T" where T is
    // instantiated with "int[4]"), extract the outer bound from the
    // array type as our array size. We do this with constant and
    // dependently-sized array types.
```
    typedef TYPE TArray[8];
    TArray x;
``` this is the same case. In `TreeTransform.h` we calculate the ArraySize earlier so that condition was failing. 

https://github.com/llvm/llvm-project/pull/83124


More information about the cfe-commits mailing list