[clang] 61d5041 - [Clang][test] Re-enable nested generic lambda tests (#238805)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 8 09:07:58 PST 2026
Author: Macro Terra
Date: 2026-11-09T01:07:52+08:00
New Revision: 61d504125f5c44bba599224f9a7f25b3e6ede508
URL: https://github.com/llvm/llvm-project/commit/61d504125f5c44bba599224f9a7f25b3e6ede508
DIFF: https://github.com/llvm/llvm-project/commit/61d504125f5c44bba599224f9a7f25b3e6ede508.diff
LOG: [Clang][test] Re-enable nested generic lambda tests (#238805)
Re-enable the existing `t2` and `t3` nested generic-lambda tests by
removing their `#if 0` guard. Both include a local class member function
with a deduced return type; `t3` additionally exercises constraints. All
test code and type assertions are unchanged.
Due to bisection, the behavior changed since
eb08c0f1659d12524f58a01bf174177b8acedf2e (#86817), committed on April 2,
2024.
Validation: the complete restored file passes its existing C++20
`-fsyntax-only -verify` RUN command twice with assertions enabled at
90fd89ca9155697a1fa4dc2285a4876a8db5ad20. The upstream source at this
PR's base matches the tested file before applying this two-line
deletion.
Prepared with assistance from Codex.
Added:
Modified:
clang/test/SemaTemplate/generic-lambda.cpp
Removed:
################################################################################
diff --git a/clang/test/SemaTemplate/generic-lambda.cpp b/clang/test/SemaTemplate/generic-lambda.cpp
index 7e7c3419f1b43c..4986de21bd6624 100644
--- a/clang/test/SemaTemplate/generic-lambda.cpp
+++ b/clang/test/SemaTemplate/generic-lambda.cpp
@@ -27,7 +27,6 @@ template <class T1> X<X<X<T1>>> t1() {
};
template X<X<X<int>>> t1<int>();
-#if 0 // FIXME: crashes
template<class T1> auto t2() {
return []<class T2>(T2) {
struct S {
@@ -59,7 +58,6 @@ template<class T1> C1<X<X<T1>>> auto t3() {
};
template C1<X<X<int>>> auto t3<int>();
static_assert(is_same<decltype(t3<int>()), X<X<X<int>>>>);
-#endif
namespace GH95735 {
More information about the cfe-commits
mailing list