Author: Mariya Podchishchaeva
Date: 2025-04-30T10:30:08+02:00
New Revision: f62f36b91de684ddfe129532e3a5086009b16f34

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

LOG: [clang][NFC] Avoid a duplicate variable in SemaExprCXX.cpp (#137464)

Added: 
    

Modified: 
    clang/lib/Sema/SemaExprCXX.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index e6c6f57e6648b..73be4080ff90f 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -3596,9 +3596,8 @@ FunctionDecl 
*Sema::FindDeallocationFunctionForDestructor(SourceLocation Loc,
 
   // If there's no class-specific operator delete, look up the global
   // non-array delete.
-  QualType RecordType = Context.getRecordType(RD);
-  IDP.PassAlignment =
-      alignedAllocationModeFromBool(hasNewExtendedAlignment(*this, 
RecordType));
+  IDP.PassAlignment = alignedAllocationModeFromBool(
+      hasNewExtendedAlignment(*this, DeallocType));
   IDP.PassSize = SizedDeallocationMode::Yes;
   return FindUsualDeallocationFunction(Loc, IDP, Name);
 }


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

Reply via email to