[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 26 08:45:03 PST 2024


zyn0217 wrote:

In passing, the current strategy of preserving trailing requires expressions in `TransformLambdaExpr` confuses me:

https://github.com/llvm/llvm-project/blob/f13aac6517532bd1ec016d432c23e92ab6450313/clang/lib/Sema/TreeTransform.h#L13686-L13692

Is there a reason why we decided *not* to perform the requires-expression transformation before this line? Could it be due to some "dependency" issues during the requires-expression evaluation?

Interestingly, this bug could also be resolved by performing additional transformation for such requirements, which is the case since those variables (e.g. `params` in the reproducer) inside the requires-clause get redirected to the *current* instantiated lambda `Decl` that way. But it makes two tests fail, and therefore I doubt if it's that I've missed some hacks, or just because I'm on the wrong direction?

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


More information about the cfe-commits mailing list