https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146985
Decl is already of FunctionDecl *. >From 0c026bfa15e41798ea1df03a31d5f4a7a2d691c3 Mon Sep 17 00:00:00 2001 From: Kazu Hirata <k...@google.com> Date: Thu, 3 Jul 2025 16:34:38 -0700 Subject: [PATCH] [Sema] Remove an unnecessary cast (NFC) Decl is already of FunctionDecl *. --- clang/lib/Sema/SemaConcept.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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<FunctionDecl *>(Decl), *MLTAL, Scope); + LambdaScopeForCallOperatorInstantiationRAII LambdaScope(*this, Decl, *MLTAL, + Scope); return CheckConstraintSatisfaction(Template, TemplateAC, *MLTAL, PointOfInstantiation, Satisfaction); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits