[clang] [clang][Sema] Fix a bug when instantiating a lambda with requires clause (PR #65193)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 07:03:02 PDT 2023


erichkeane wrote:

> We have `addInstantiatedParametersToScope` - Which we use in SetupConstraints`for example We could reuse that to add the parameter of the enclosing function. We could similarly add an`addInstantiatedLocalVarsToScope` method doing the same thing.
> 
> And the logic could be moved to `LambdaScopeForCallOperatorInstantiationRAII`
> 
> @erichkeane for additional feedback

That sounds like a really good idea to me.  We seem to be messing with this sort of thing all over the place, so having it all in 1 place seems beneficial.

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


More information about the cfe-commits mailing list