[clang] [Sema] Remove an unnecessary cast (NFC) (PR #146985)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 3 19:28:01 PDT 2025
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 <kazu at 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);
More information about the cfe-commits
mailing list