diff --git a/clang/lib/Sema/SemaConcept.cpp b/clang/lib/Sema/SemaConcept.cpp index 1594b4423e4d2..be9737d9e7c1a 100644 --- a/clang/lib/Sema/SemaConcept.cpp +++ b/clang/lib/Sema/SemaConcept.cpp @@ -1138,8 +1138,8 @@ bool Sema::CheckFunctionTemplateConstraints( } CXXThisScopeRAII ThisScope(*this, Record, ThisQuals, Record != nullptr); - LambdaScopeForCallOperatorInstantiationRAII LambdaScope( - *this, const_cast(Decl), *MLTAL, Scope); + LambdaScopeForCallOperatorInstantiationRAII LambdaScope(*this, Decl, *MLTAL, + Scope); return CheckConstraintSatisfaction(Template, TemplateAC, *MLTAL, PointOfInstantiation, Satisfaction);