[clang] [Clang] prevent crash in delayed default-argument lambda captures (PR #176749)
Oleksandr Tarasiuk via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 25 11:51:33 PDT 2026
================
----------------
a-tarasyuk wrote:
@AaronBallman, Thanks for the feedback. The patch adds the only function scope for delayed default-argument parsing. Without it, lambda capture handling can reach `tryCaptureVariable` without an enclosing entry in `Sema::FunctionScopes`.
These are two different paths:
1. Delayed default arguments
https://github.com/llvm/llvm-project/blob/61533e7e75abb12492bc98459d97dda4ee7ccae0/clang/lib/Parse/ParseCXXInlineMethods.cpp#L388-L448
2. Delayed exception-specification
https://github.com/llvm/llvm-project/blob/61533e7e75abb12492bc98459d97dda4ee7ccae0/clang/lib/Parse/ParseCXXInlineMethods.cpp#L469-L559
Am I missing something?
https://github.com/llvm/llvm-project/pull/176749
More information about the cfe-commits
mailing list