Files
swift-mirror/test/Interop/Cxx/concepts/Inputs/method-requires.h
Egor Zhdan 21745e52c4 [cxx-interop] Do not emit IR for C++20 requires expr
This fixes a compiler crash when emitting IR for a for-in loop over a C++ `std::vector` in C++20 mode.

rdar://108810356
2023-05-05 17:21:38 +01:00

12 lines
249 B
C++

inline void calledFromConceptBody(int x) {}
inline void calledFromMethodBody(int x) {}
struct MyStruct {
template <typename T>
void foo(T x)
requires requires(const T x) { calledFromConceptBody(x); }
{
calledFromMethodBody(x);
}
};