ANAMASGARD wrote: Hi @zwuis @TPPPP72 thank you so much for the feedback. I have updated the patch.
- My earlier explanation was wrong: the lambda scope was **not** popped. - During delayed default-arg parsing, a temporary `FunctionScopeInfo` sits on top of `LambdaScopeInfo`. - The old lookup stopped at that frame and missed the lambda scope → assert/crash. - **Fix:** skip all non-`LambdaScopeInfo` frames until we find the lambda scope. The assert stays. - **Result:** `__FUNCTION__` in a lambda-local struct default arg now resolves to the lambda’s `operator()`, like MSVC. - Added tests in `GH213420.cpp` for the crash and the `__FUNCTION__` case. Let me know if anything still needs tweaking. https://github.com/llvm/llvm-project/pull/213556 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
