This seems to be a leftover from d30b23d6a54b3f0883914f3c2c2318a78edcbe67 "[c++2a] P0515R3: Support for overloaded operator<=>." (The corresponding llvm_unreachable in clang/lib/Sema/SemaOverload.cpp was e.g. fixed in 0683c0e68d31d18f6e4fedb270317844a4912882 "[C++2a] Implement operator<=> CodeGen and ExprConstant".)
It caused compilation of recent libstdc++ trunk <vector> to crash in -std=c++2a mode, hitting the llvm_unreachable.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Minimal reproducer is
template<typename> struct S; template<typename T> void operator <=>(S<T>, S<T>); template<typename T> void f(T x) { decltype(x <=> x) v; }
Added a corresponding test to clang/test/SemaCXX/cxx2a-three-way-comparison.cpp.
Comment Actions
An equivalent patch was landed as llvmorg-11-init-2132-gb96c6b65b93 to fix PR44786. Thanks!