================ @@ -19000,7 +19056,7 @@ bool Sema::tryCaptureVariable( Explicit = false; FunctionScopesIndex--; if (IsInScopeDeclarationContext) - DC = ParentDC; + DC = skipRequiresBody(ParentDC); ---------------- zyn0217 wrote:
Hmm, do you have a test for it? e.g. the requires expression contains a lambda that contains another requires expression which would cause a crash for now. https://github.com/llvm/llvm-project/pull/107942 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits