https://github.com/kazutakahirata created 
https://github.com/llvm/llvm-project/pull/146986

Lambda is already of CXXRecordDecl *.


>From 171b13caff2e97c81d4a5091c6be912abb04c926 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <k...@google.com>
Date: Thu, 3 Jul 2025 16:37:23 -0700
Subject: [PATCH] [Lambda] Remove an unnecessary cast (NFC)

Lambda is already of CXXRecordDecl *.
---
 clang/lib/Serialization/ASTReader.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/clang/lib/Serialization/ASTReader.cpp 
b/clang/lib/Serialization/ASTReader.cpp
index d380afd1ed1bd..6e03de87e587d 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -9463,8 +9463,7 @@ void ASTReader::AssignedLambdaNumbering(CXXRecordDecl 
*Lambda) {
 
   // Keep track of this lambda so it can be merged with another lambda that
   // is loaded later.
-  LambdaDeclarationsForMerging.insert(
-      {LambdaInfo, const_cast<CXXRecordDecl *>(Lambda)});
+  LambdaDeclarationsForMerging.insert({LambdaInfo, Lambda});
 }
 
 void ASTReader::LoadSelector(Selector Sel) {

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to