[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-05-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/78896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-25 Thread via cfe-commits
cor3ntin wrote: both compiler seems to mangkle it as `_ZNK6XXXYYYMUlT_E_clIiEEDaS0_` which looks correct (`auto XXXYYY::{lambda(auto:1)#1}::operator()(int) const`) @rjmccall Compiler explorer let you demangle identifiers (in the output menu, under the compilers dropdown

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-25 Thread Qizhi Hu via cfe-commits
jcsxky wrote: @cor3ntin I test this code ```cpp inline auto XXXYYY = [](auto a) { return [=]() { return 1; }; }; void foo(){ XXXYYY(1); } ``` after name mangling, clang outputs: ```cpp call void @_ZNK6XXXYYYMUlT_E_clIiEEDaS0_(ptr noundef nonnull align 1

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: Should it change the mangle part in libcxx also? https://github.com/llvm/llvm-project/pull/78896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-22 Thread Qizhi Hu via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s jcsxky wrote: Sorry, I am afraid that I misunderstand root cause of this issue and still need more working on it. https://github.com/llvm/llvm-project/pull/78896

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78896 >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH 1/2] [Clang][Sema] fix outline member function template with default

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s +// expected-no-diagnostics + +auto ICE = [](auto a) { return [=]() { return 1; }; }; cor3ntin wrote: Can you reference the issue number in the test?

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread via cfe-commits
cor3ntin wrote: Thanks for this patch. Can you add a release note? Does this fix any of these issues ? (if so, can you add test for them? #76481 #70064 #63271 #61939 #45441 https://github.com/llvm/llvm-project/pull/78896 ___ cfe-commits mailing

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s cor3ntin wrote: `-fsyntax-only` is suspicious, i would prefer a CodeGenTest that checks the mangle name Maybe moving the test to `test/CodeGenCXX/mangle-lambdas.cpp ` (or one of the other

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78896 >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH 1/2] [Clang][Sema] fix outline member function template with default

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes Try to fix [issue](https://github.com/llvm/llvm-project/issues/78542) by creating a new `FunctionTypeDepthState` and pop it after finish. --- Full diff: https://github.com/llvm/llvm-project/pull/78896.diff 2

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/78896 Try to fix [issue](https://github.com/llvm/llvm-project/issues/78542) by creating a new `FunctionTypeDepthState` and pop it after finish. >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001