mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This fixes a compiler crash when emitting IR for a for-in loop over a C++ `std::vector` in C++20 mode. rdar://108810356
12 lines
249 B
C++
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);
|
|
}
|
|
};
|