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

2024-04-17 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/89036 >From 56c2b4f70735a6ef3b80cb8461a88ea51f2d02d7 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 16 Apr 2024 17:48:45 +0530 Subject: [PATCH 1/4] [Clang][Sema] placement new initializes typedef array with

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

2024-04-17 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/89036 >From 56c2b4f70735a6ef3b80cb8461a88ea51f2d02d7 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 16 Apr 2024 17:48:45 +0530 Subject: [PATCH 1/4] [Clang][Sema] placement new initializes typedef array with

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

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (mahtohappy) Changes When in-place new-ing a local variable of an array of trivial type, the generated code calls 'memset' with the correct size of the array, earlier it was generating size (squared of the typedef array + size).

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

2024-04-17 Thread via cfe-commits
https://github.com/mahtohappy created https://github.com/llvm/llvm-project/pull/89036 When in-place new-ing a local variable of an array of trivial type, the generated code calls 'memset' with the correct size of the array, earlier it was generating size (squared of the typedef array + size).