Add explicit capture for `this` pointer in attempt to fix gcc5 build (NFC)

This commit is contained in:
Mehdi Amini 2022-02-27 21:41:23 +00:00
parent d07ff99591
commit fdfe26ddbe
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ Value CodeGen::genNonInitializerVar(const ast::VariableDecl *varDecl,
Value typeValue = Value typeValue =
TypeSwitch<const ast::Node *, Value>(constraint.constraint) TypeSwitch<const ast::Node *, Value>(constraint.constraint)
.Case<ast::AttrConstraintDecl, ast::ValueConstraintDecl, .Case<ast::AttrConstraintDecl, ast::ValueConstraintDecl,
ast::ValueRangeConstraintDecl>([&](auto *cst) -> Value { ast::ValueRangeConstraintDecl>([&, this](auto *cst) -> Value {
if (auto *typeConstraintExpr = cst->getTypeExpr()) if (auto *typeConstraintExpr = cst->getTypeExpr())
return genSingleExpr(typeConstraintExpr); return genSingleExpr(typeConstraintExpr);
return Value(); return Value();