[clang] [Clang][NFC] Re-enable alias-template lambda constraint test (PR #233203)

Macro Terra via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 18 00:20:35 PDT 2026


https://github.com/hongtaihu created https://github.com/llvm/llvm-project/pull/233203

The T16 example in `clang/test/SemaTemplate/alias-template-with-lambdas.cpp` was left under `#if 0` in b412ec5d3924. That example no longer crashes, and the static_assert passes without extra diagnostics.

Remove the FIXME and compile the example.

No compiler behavior changes. This does not fix #62578; that issue is a different crash in the same area.

Verified with an assertions `clang -cc1 -std=c++2c -fsyntax-only -verify` on the patched file. The same example also passes on an assertions build of 34ba34d7f9bd, which does not include the local branch commits.

Assisted by Codex


>From 8302146dc3e7f5b59060eacc6c3077d5ab0e04f9 Mon Sep 17 00:00:00 2001
From: Macro Terra <13541229370 at qq.com>
Date: Sun, 18 Oct 2026 15:20:24 +0800
Subject: [PATCH] [Clang][NFC] Re-enable alias-template lambda constraint test

The T16 example in clang/test/SemaTemplate/alias-template-with-lambdas.cpp
was left under `#if 0` in b412ec5d3924. That example no longer crashes, and
the static_assert passes without extra diagnostics.

Remove the FIXME and compile the example. No compiler behavior changes.
This does not fix #62578; that issue is a different crash in the same area.
---
 clang/test/SemaTemplate/alias-template-with-lambdas.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/clang/test/SemaTemplate/alias-template-with-lambdas.cpp b/clang/test/SemaTemplate/alias-template-with-lambdas.cpp
index 5ec93163e4d188..7a0fd525be05c5 100644
--- a/clang/test/SemaTemplate/alias-template-with-lambdas.cpp
+++ b/clang/test/SemaTemplate/alias-template-with-lambdas.cpp
@@ -102,15 +102,11 @@ template <typename T> using T15 = T14<T, T>;
 
 static_assert(__is_same(T15<char>, int));
 
-// FIXME: This still crashes because we can't extract template arguments T and U
-// outside of the instantiation context of T16.
-#if 0
 template <typename T, typename... U>
 using T16 = decltype([](auto Param) requires (sizeof(Param) != 1 && sizeof...(U) > 0) {
   return Value<T, U...> + sizeof(Param);
 });
 static_assert(T16<int, char, float>()(42) == 2 + sizeof(42));
-#endif
 } // namespace GH82104
 
 namespace GH89853 {



More information about the cfe-commits mailing list