================
@@ -16304,11 +16308,13 @@
TreeTransform<Derived>::TransformLambdaExpr(LambdaExpr *E) {
// (A ClassTemplateSpecializationDecl is always a dependent context.)
while (DC->isRequiresExprBody() || isa<CXXExpansionStmtDecl>(DC))
DC = DC->getParent();
- if ((getSema().isUnevaluatedContext() ||
- getSema().isConstantEvaluatedContext()) &&
- !(dyn_cast_or_null<CXXRecordDecl>(DC->getParent()) &&
- cast<CXXRecordDecl>(DC->getParent())->isGenericLambda()) &&
- (DC->isFileContext() || !DC->getParent()->isDependentContext()))
+ if (getDerived().IsLambdaAlwaysDependent())
+ DependencyKind = CXXRecordDecl::LDK_AlwaysDependent;
----------------
akash-manna-sky wrote:
Right,
I’ve fixed by preserving the correct template-argument levels through deduction
and instantiation, including for generic lambda specializations and their
constraints. I’ve added it to the test. I also updated the title and
description.
https://github.com/llvm/llvm-project/pull/222541
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits