Skip to content

Commit 5df748d

Browse files
[Sema] Remove an unnecessary cast (NFC) (#146808)
The only use of BW is to initialize BitWidth. This patch renames BW to BitWdith while removing the cast statement.
1 parent 0f71704 commit 5df748d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3431,7 +3431,7 @@ static bool IsUnusedPrivateField(const FieldDecl *FD) {
34313431
NamedDecl *
34323432
Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D,
34333433
MultiTemplateParamsArg TemplateParameterLists,
3434-
Expr *BW, const VirtSpecifiers &VS,
3434+
Expr *BitWidth, const VirtSpecifiers &VS,
34353435
InClassInitStyle InitStyle) {
34363436
const DeclSpec &DS = D.getDeclSpec();
34373437
DeclarationNameInfo NameInfo = GetNameForDeclarator(D);
@@ -3442,8 +3442,6 @@ Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D,
34423442
if (Loc.isInvalid())
34433443
Loc = D.getBeginLoc();
34443444

3445-
Expr *BitWidth = static_cast<Expr*>(BW);
3446-
34473445
assert(isa<CXXRecordDecl>(CurContext));
34483446
assert(!DS.isFriendSpecified());
34493447

0 commit comments

Comments
 (0)