| Issue |
238310
|
| Summary |
The mangled name for a function with a lambda in its requires varies with the preceding code.
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
TabbySqui
|
The code below produces symbol
```
_Z3getIiEivQeqstT_clL3$_1EE
^
```
```c++
template<typename T>
int mig() requires (sizeof(T)==[](){return 4;}()) {}
template int mig<int>();
template<typename T>
int get() requires (sizeof(T)==[](){return 4;}()) {}
template int get<int>();
```
While the code below produces
```
_Z3getIiEivQeqstT_clL3$_0EE
^
```
```c++
/*template<typename T>
int mig() requires (sizeof(T)==[](){return 4;}()) {}
template int mig<int>();*/
template<typename T>
int get() requires (sizeof(T)==[](){return 4;}()) {}
template int get<int>();
```
https://godbolt.org/z/sM86baorn
Gcc uses `Ul*E` mangling in this case.
<details>
<summary>clang-trunk </summary>
```
clang version 24.0.0git (https://github.com/llvm/llvm-project.git dd61e451bba8b20ff019bffd054f7e3d989a3e7d)
```
</details>
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs