[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

Qizhi Hu via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 25 00:36:30 PST 2024


jcsxky wrote:

@cor3ntin I test this code
```cpp
inline auto XXXYYY = [](auto a) {
	return [=]<typename b>() {
		return 1;
	};
};

void foo(){
	XXXYYY(1);
}

```
after name mangling, clang outputs:
```cpp
call void @_ZNK6XXXYYYMUlT_E_clIiEEDaS0_(ptr noundef nonnull align 1 dereferenceable(1) @XXXYYY, i32 noundef 1)
```
and gcc output:
```cpp
call	_ZNK6XXXYYYMUlT_E_clIiEEDaS_
```
Is this expected?



https://github.com/llvm/llvm-project/pull/78896


More information about the cfe-commits mailing list