Skip to content

Commit 7b4dbb4

Browse files
[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.
1 parent 2723a6d commit 7b4dbb4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Sema/SemaAttr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ void Sema::ActOnPragmaClangSection(SourceLocation PragmaLoc,
436436
}
437437

438438
void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action,
439-
StringRef SlotLabel, Expr *alignment) {
439+
StringRef SlotLabel, Expr *Alignment) {
440440
bool IsXLPragma = getLangOpts().XLPragmaPack;
441441
// XL pragma pack does not support identifier syntax.
442442
if (IsXLPragma && !SlotLabel.empty()) {
@@ -445,7 +445,6 @@ void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action,
445445
}
446446

447447
const AlignPackInfo CurVal = AlignPackStack.CurrentValue;
448-
Expr *Alignment = static_cast<Expr *>(alignment);
449448

450449
// If specified then alignment must be a "small" power of two.
451450
unsigned AlignmentVal = 0;

0 commit comments

Comments
 (0)