[clang] [Sema] Fix crash in DeclareAggregateDeductionGuideFromInitList for alias templates (PR #207478)
Krisitan Erik Olsen via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 13 16:50:32 PDT 2026
================
@@ -0,0 +1,17 @@
+// RUN: not %clang_cc1 -std=c++23 -fsyntax-only %s
+// Reduced from a fuzzer-generated crash report.
+// Ensure we don't crash when aggregate deduction guide resolution
+// fails for a type alias template during CTAD.
+__detail __detail:);
+template _Tptypename convertible_to_Tpcommon_reference_t_Tp_Up }
+requires0template
+namespace ranges __iter_traits >;
+template __iter_diff_tremove_cvref_t_Tp rangesiter_swap0
+namespace detail {
+template < typename > struct difference_type_
+}
+template < typename T > using difference_type = difference_type_< T >;
+namespace detail {
+template < typename T >
+struct difference_type_ : T
----------------
Kristianerik wrote:
Updated the test to use -verify with expected-error annotations. Couldn't reduce the reproducer further, every line is needed to trigger the error recovery state that causes the crash.
https://github.com/llvm/llvm-project/pull/207478
More information about the cfe-commits
mailing list