diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index f473f97f6c74e2..26fdffe920e954 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -327,6 +327,10 @@ Bug Fixes in This Version (`#62122 `_) - Fix crash when handling undefined template partial specialization (`#61356 `_) +- Fix a crash caused by incorrectly evaluating constraints on an inheriting + constructor declaration. + (`#62361 `_) + (`#62362 `_) Bug Fixes to Compiler Builtins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/clang/test/SemaTemplate/concepts-inherited-ctor.cpp b/clang/test/SemaTemplate/concepts-inherited-ctor.cpp index f50a6aebeeab46..d6f3546b25fbc0 100644 --- a/clang/test/SemaTemplate/concepts-inherited-ctor.cpp +++ b/clang/test/SemaTemplate/concepts-inherited-ctor.cpp @@ -68,3 +68,25 @@ namespace no_early_substitution { C(); } } + +namespace GH62362 { + template + concept C = true; + template struct Test { + Test() + requires(C); + }; + struct Bar : public Test { + using Test::Test; + }; + template <> + struct Test : public Test { + using Test::Test; + }; + + void foo() { + Bar(); + Test(); + } +} +}