mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Clang now includes concepts in the mangled names of C++ functions: 4b163e343c
This adjusts the test to verify that we don't transitively emit the symbols referenced from the requires expression. Those symbols shouldn't be emitted because they are not executed.
rdar://127263407
14 lines
329 B
C++
14 lines
329 B
C++
inline void shouldNotBeCalledOrEmitted(int) {}
|
|
|
|
inline void calledFromConceptBody(int x) { shouldNotBeCalledOrEmitted(x); }
|
|
inline void calledFromMethodBody(int x) {}
|
|
|
|
struct MyStruct {
|
|
template <typename T>
|
|
void foo(T x)
|
|
requires requires(const T x) { calledFromConceptBody(x); }
|
|
{
|
|
calledFromMethodBody(x);
|
|
}
|
|
};
|