
Fixes #86757 We missed to handle the invalid case when substituting into the parameter mapping of an constraint during normalization. The constructor of `InstantiatingTemplate` will bail out (no `CodeSynthesisContext` will be added to the instantiation stack) if there was a fatal error, consequently we should stop doing any further template instantiations.
14 lines
388 B
C++
14 lines
388 B
C++
// RUN: %clang_cc1 -std=c++20 -Wfatal-errors -verify %s
|
|
|
|
template <typename> int a;
|
|
template <typename... b> concept c = a<b...>;
|
|
template <typename> concept e = c<>;
|
|
|
|
// must be a fatal error to trigger the crash
|
|
undefined; // expected-error {{a type specifier is required for all declarations}}
|
|
|
|
template <typename d> concept g = e<d>;
|
|
template <g> struct h
|
|
template <g d>
|
|
struct h<d>;
|