| Issue |
181564
|
| Summary |
[Clang, C++20] Undefined symbol for redeclared friend function with requires.
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
ActuallyaDeviloper
|
Clang seems not to recognize that a friend function is redeclared, if it has "requires".
```
#include <stddef.h>
template<size_t i>
struct A
{
friend constexpr inline void b(A<i>) requires(i == 3)
{}
};
constexpr void b(A<3>);
void Do()
{
::b(A<3>());
}
```
Emits:
```
"Do()":
jmp "b(A<3ul>)"
```
This results in an unresolvable function reference at link time.
GCC seems to behave the same way, however MSVC gets it right.
If the "requires" is removed, everything works fine.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs