================ @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -fsyntax-only %s -verify +// expected-no-diagnostics + +template <int i> +int g() { + return [] (auto) -> int { + struct L { + int m = i; + }; + return 0; + } (42); ---------------- zyn0217 wrote:
I feel like this is some fallout of not decoupling instantiating lambda body from the lambda transformation. If we had been able to avoid the body transform when transforming the lambda for the call expression, we could also have avoided instantiating an offending intermediate `L`, right? @erichkeane https://github.com/llvm/llvm-project/pull/121225 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits