[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-15 Thread Daniel Thornburgh via cfe-commits
mysterymath wrote: Here's a link to a reproducer tar; I was able to verify that this reproduces locally using our toolchain prebuilt from CI: https://storage.googleapis.com/fuchsia-artifacts/builds/8717549930672410881/build-debug/clang-crashreports/map_setting_store-0b592c.tar https://github.c

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Can you send reproducer and / or stack trace? FYI you can use `CLANG_CRASH_DIAGNOSTICS_DIR` environment variable to make clang put these automatically generated reproducers up in a directory which will have its contents exported as artifacts. https://github.com/llvm/llvm-proje

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-15 Thread Daniel Thornburgh via cfe-commits
mysterymath wrote: This looks to be the likely culprit for a clang crash in the Fuchsia build: ``` [21173/168418](63) CXX host_x64/obj/src/developer/debug/zxdb/client/libclient.map_setting_store.cc.o FAILED: [code=1] host_x64/obj/src/developer/debug/zxdb/client/libclient.map_setting_store.cc.o

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-14 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/134038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM as well. https://github.com/llvm/llvm-project/pull/134038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Woops! Sorry, I thought I had already approved this with teh nit about the tests. Sorry about that! https://github.com/llvm/llvm-project/pull/134038 ___ cfe-commits mailing list cfe-commits@l

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-13 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Review ping https://github.com/llvm/llvm-project/pull/134038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/134038 >From a670287721da08e54e2908e9abe52ad86a92769b Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 2 Apr 2025 14:44:40 +0800 Subject: [PATCH 1/6] [Clang] Fix dependent local class instantiation bugs --- cla

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/134038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/134038 >From a670287721da08e54e2908e9abe52ad86a92769b Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 2 Apr 2025 14:44:40 +0800 Subject: [PATCH 1/4] [Clang] Fix dependent local class instantiation bugs --- cla

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/134038 >From a670287721da08e54e2908e9abe52ad86a92769b Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 2 Apr 2025 14:44:40 +0800 Subject: [PATCH 1/5] [Clang] Fix dependent local class instantiation bugs --- cla

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This once again looks like an attempt at hacking around our lack of delayed lambda body instantiation... And this one has some pretty sizable negatives as far as I can see. I'm not sure I really like this direction. https://github.com/llvm/llvm-project

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-03 Thread Erich Keane via cfe-commits
@@ -1,6 +1,9 @@ // RUN: %clang_cc1 -verify -std=c++11 %s // RUN: %clang_cc1 -verify -std=c++11 -fdelayed-template-parsing %s // RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s +// RUN: %clang_cc1 -std=c++17 %s -DCodeGen -emit-llvm -triple %itanium_abi_triple -o - | FileChe

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes This patch fixes two long-standing bugs that prevent Clang from instantiating local class members inside a dependent context. These bugs were introduced in commits 21eb1af469c3 and 919df9d75a. 21eb1af469c3

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-03 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/134038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-03 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I talked to @erichkeane and updated the approach to make it feel less like a workaround and independent of lambda instantiation. As noted, both cases worked prior to clang 15, which means they didn’t rely on deferred lambda body instantiation to compile correctly. Regarding the

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/134038 >From a670287721da08e54e2908e9abe52ad86a92769b Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 2 Apr 2025 14:44:40 +0800 Subject: [PATCH 1/2] [Clang] Fix dependent local class instantiation bugs --- cla

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-02 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > I wouldn't be able to convince you to start work on the delayed lambda body > instantiation instead, would I ? :-P AFAIK @LYP951018 is already working on this region. Though I haven't test that patch with it yet 🥲 https://github.com/llvm/llvm-project/pull/134038

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-02 Thread Erich Keane via cfe-commits
erichkeane wrote: > > This once again looks like an attempt at hacking around our lack of delayed > > lambda body instantiation... And this one has some pretty sizable negatives > > as far as I can see. I'm not sure I really like this direction. > > Yeah, admittedly this is another workaround

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-02 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > This once again looks like an attempt at hacking around our lack of delayed > lambda body instantiation... And this one has some pretty sizable negatives > as far as I can see. I'm not sure I really like this direction. Yeah, admittedly this is another workaround of not havin

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-02 Thread Younan Zhang via cfe-commits
@@ -4264,7 +4264,8 @@ Sema::InstantiateClassMembers(SourceLocation PointOfInstantiation, if (FunctionDecl *Pattern = Function->getInstantiatedFromMemberFunction()) { -if (Function->isIneligibleOrNotSelected()) +if (!Instantiation->getDeclCo

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

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

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4264,7 +4264,8 @@ Sema::InstantiateClassMembers(SourceLocation PointOfInstantiation, if (FunctionDecl *Pattern = Function->getInstantiatedFromMemberFunction()) { -if (Function->isIneligibleOrNotSelected()) +if (!Instantiation->getDeclCo

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-01 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/134038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-01 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/134038 Fixes https://github.com/llvm/llvm-project/issues/59734 Fixes https://github.com/llvm/llvm-project/issues/132208 >From a670287721da08e54e2908e9abe52ad86a92769b Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: