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

2024-05-29 Thread via cfe-commits
awson wrote: It looks like the author of the patch have either diverted to other activities or is unable to fix it. Could we, perhaps, **just diagnose** the situation and gracefully fail with something like "typedefed array blah-blah is not supported in blah-blah" instead of generating

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

2024-04-23 Thread Erich Keane via cfe-commits
erichkeane wrote: > @mahtohappy can we please revert this in the meantime while you look for a > fix here. Feel free to land it again with the fix. He's likely outside of work hours, but feel free to submit a revert. https://github.com/llvm/llvm-project/pull/89036

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

2024-04-23 Thread Pranav Kant via cfe-commits
pranavk wrote: @mahtohappy can we please revert this in the meantime while you look for a fix here. Feel free to land it again with the fix. https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-23 Thread via cfe-commits
mahtohappy wrote: Hi @ilovepi Sure. Looking at this. https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-23 Thread Paul Kirth via cfe-commits
ilovepi wrote: I think we're seeing some build failures after this patch, and it isn't clear to me that this is a bug in the source, so I'd appreciate it if you could take a look. ``` FAILED: obj/src/media/audio/tools/signal_generator/signal_generator.signal_generator.cc.o

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

2024-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-23 Thread via cfe-commits
mahtohappy wrote: Hi @erichkeane Please merge this change. https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-21 Thread via cfe-commits
mahtohappy wrote: Hi @cor3ntin Please merge this. https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-21 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/6] [Clang][Sema] placement new initializes typedef array with

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

2024-04-20 Thread via cfe-commits
mahtohappy wrote: Hi, the build is failing for windows but there's not test failures and no errors in the log. What should I do from here? https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-19 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/5] [Clang][Sema] placement new initializes typedef array with

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

2024-04-19 Thread Erich Keane via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang --target=x86_64-pc-linux -S -fno-discard-value-names -emit-llvm -o - %s | FileCheck %s + +namespace std { erichkeane wrote: Tests STILL haven't changed from the original patch. Please add the regression to this test as well.

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

2024-04-19 Thread via cfe-commits
@@ -12864,6 +12864,19 @@ TreeTransform::TransformCXXNewExpr(CXXNewExpr *E) { ArraySize = NewArraySize.get(); } + // Per C++0x [expr.new]p5, the type being constructed may be a + // typedef of an array type. + QualType AllocType = AllocTypeInfo->getType(); + if

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

2024-04-19 Thread Erich Keane via cfe-commits
@@ -12864,6 +12864,19 @@ TreeTransform::TransformCXXNewExpr(CXXNewExpr *E) { ArraySize = NewArraySize.get(); } + // Per C++0x [expr.new]p5, the type being constructed may be a + // typedef of an array type. + QualType AllocType = AllocTypeInfo->getType(); + if

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

2024-04-19 Thread via cfe-commits
@@ -12864,6 +12864,19 @@ TreeTransform::TransformCXXNewExpr(CXXNewExpr *E) { ArraySize = NewArraySize.get(); } + // Per C++0x [expr.new]p5, the type being constructed may be a + // typedef of an array type. + QualType AllocType = AllocTypeInfo->getType(); + if

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

2024-04-19 Thread Erich Keane via cfe-commits
@@ -12864,6 +12864,19 @@ TreeTransform::TransformCXXNewExpr(CXXNewExpr *E) { ArraySize = NewArraySize.get(); } + // Per C++0x [expr.new]p5, the type being constructed may be a + // typedef of an array type. + QualType AllocType = AllocTypeInfo->getType(); + if

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

2024-04-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Where is the repro from the original author? What did they share, and what ended up being the solution/test here for it? https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list

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

2024-04-19 Thread via cfe-commits
mahtohappy wrote: Check is for dependent types and earlier I was not checking that with the condition being only ```if (ArraySize)``` so normal arrays with new initializer also were passing the check. Now added the dependent type check as well ```if (ArraySize && E->isTypeDependent())```

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

2024-04-19 Thread David Blaikie via cfe-commits
dwblaikie wrote: > Yes it's fixed now. Please include details of the fix I the patch description https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-19 Thread via cfe-commits
mahtohappy wrote: Yes it's fixed now. https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-18 Thread David Blaikie via cfe-commits
dwblaikie wrote: > The original patch pointed out a regression: > > https://github.com/llvm/llvm-project/pull/83124#issuecomment-2060090590 > > Please contact that person and get a reproducer and make sure you aren't > breaking them. Repro was provided further down:

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

2024-04-18 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/5] [Clang][Sema] placement new initializes typedef array with

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

2024-04-18 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/5] [Clang][Sema] placement new initializes typedef array with

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

2024-04-18 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/5] [Clang][Sema] placement new initializes typedef array with

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

2024-04-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: The original patch pointed out a regression: https://github.com/llvm/llvm-project/pull/83124#issuecomment-2060090590 Please contact that person and get a reproducer and make sure you aren't breaking them.

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

2024-04-17 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits