Skip to content

Commit f2d28e4

Browse files
committed
[FOLD] add test and release note
1 parent 715406a commit f2d28e4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,8 @@ Bug Fixes to C++ Support
693693
and (#GH88832).
694694
- Clang now defers all substitution into the exception specification of a function template specialization
695695
until the noexcept-specifier is instantiated.
696+
- Fix a crash when an implicitly declared ``operator==`` function with a trailing requires-clause has its
697+
constraints compared to that of another declaration.
696698

697699
Bug Fixes to AST Handling
698700
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/test/CXX/class/class.compare/class.compare.default/p4.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,14 @@ struct non_constexpr_type {
161161

162162
my_struct<non_constexpr_type> obj; // cxx2a-note {{in instantiation of template class 'GH61238::my_struct<GH61238::non_constexpr_type>' requested here}}
163163
}
164+
165+
namespace Constrained {
166+
template<typename T>
167+
struct A {
168+
std::strong_ordering operator<=>(const A&) const requires true = default;
169+
};
170+
171+
bool f(A<int> a) {
172+
return a != A<int>();
173+
}
174+
}

0 commit comments

Comments
 (0)