[clang] [Clang] Fixed getPredefinedExprDecl Assert When No Lambda Scope (PR #221713)

via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 8 05:05:15 PDT 2026


StefanPaulet wrote:

The changes look good to me, thanks for this!

> Checking the synchronization between `DeclContext` and `LambdaScopeInfo` is a good idea, but I am concerned that adding such generalization might slightly impact performance when option `-fms-extensions` is enabled; perhaps this isn't the best approach—though, of course, that is just my personal opinion
If performance is a concern, I am wondering if we could optimize the lookup for the corresponding `LambdaScopeInfo` by starting from the last known `LambdaScopeInfo` (similar to what I had previously done). But this depends on whether or not lambdas and an explicit definition of a lambda's call operator can nest within each other, which I am unsure about.


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


More information about the cfe-commits mailing list