Author: Kazu Hirata
Date: 2025-07-01T22:49:48-07:00
New Revision: 7b4dbb4f37d8d40f48df6092fe54503a491eb3c2

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

LOG: [Sema] Remove an unnecessary cast (NFC) (#146622)

Since both alignment and Alignment are of the same type, this patch
renames alignment to Alignment while removing the cast statement.

Added: 
    

Modified: 
    clang/lib/Sema/SemaAttr.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp
index c1675a6c67f14..3eed6ad7fe6b3 100644
--- a/clang/lib/Sema/SemaAttr.cpp
+++ b/clang/lib/Sema/SemaAttr.cpp
@@ -436,7 +436,7 @@ void Sema::ActOnPragmaClangSection(SourceLocation PragmaLoc,
 }
 
 void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction 
Action,
-                           StringRef SlotLabel, Expr *alignment) {
+                           StringRef SlotLabel, Expr *Alignment) {
   bool IsXLPragma = getLangOpts().XLPragmaPack;
   // XL pragma pack does not support identifier syntax.
   if (IsXLPragma && !SlotLabel.empty()) {
@@ -445,7 +445,6 @@ void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, 
PragmaMsStackAction Action,
   }
 
   const AlignPackInfo CurVal = AlignPackStack.CurrentValue;
-  Expr *Alignment = static_cast<Expr *>(alignment);
 
   // If specified then alignment must be a "small" power of two.
   unsigned AlignmentVal = 0;


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

Reply via email to