https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/147546
D is already of CXXMethodDecl *. >From fac2b8100d07fa36191caf3643218ff95adc5e9a Mon Sep 17 00:00:00 2001 From: Kazu Hirata <k...@google.com> Date: Tue, 8 Jul 2025 07:18:59 -0700 Subject: [PATCH] [Sema] Remove an unnecessary cast (NFC) D is already of CXXMethodDecl *. --- clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index a25bfd1c48dee..c6633cbe51cef 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -3029,7 +3029,7 @@ Decl *TemplateDeclInstantiator::VisitCXXMethodDecl( LocalInstantiationScope Scope(SemaRef, MergeWithParentScope); Sema::LambdaScopeForCallOperatorInstantiationRAII LambdaScope( - SemaRef, const_cast<CXXMethodDecl *>(D), TemplateArgs, Scope); + SemaRef, D, TemplateArgs, Scope); // Instantiate enclosing template arguments for friends. SmallVector<TemplateParameterList *, 4> TempParamLists; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits