Author: Kazu Hirata
Date: 2025-07-03T22:04:31-07:00
New Revision: 8fe205d31695e43b31f0d5334384cc297e440571

URL: 
https://github.com/llvm/llvm-project/commit/8fe205d31695e43b31f0d5334384cc297e440571
DIFF: 
https://github.com/llvm/llvm-project/commit/8fe205d31695e43b31f0d5334384cc297e440571.diff

LOG: [Serialization] Remove an unnecessary cast (NFC) (#146986)

Lambda is already of CXXRecordDecl *.

Added: 
    

Modified: 
    clang/lib/Serialization/ASTReader.cpp

Removed: 
    


################################################################################
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) {


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

Reply via email to