Skip to content

Commit

Permalink
[clang][Sema][NFC] Remove an unnecessary static_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Oct 5, 2023
1 parent fc865c2 commit 32d16b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Sema/SemaDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18215,8 +18215,8 @@ ExprResult Sema::VerifyBitField(SourceLocation FieldLoc,
/// to create a FieldDecl object for it.
Decl *Sema::ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart,
Declarator &D, Expr *BitfieldWidth) {
FieldDecl *Res = HandleField(S, cast_or_null<RecordDecl>(TagD),
DeclStart, D, static_cast<Expr*>(BitfieldWidth),
FieldDecl *Res = HandleField(S, cast_if_present<RecordDecl>(TagD), DeclStart,
D, BitfieldWidth,
/*InitStyle=*/ICIS_NoInit, AS_public);
return Res;
}
Expand Down

0 comments on commit 32d16b6

Please sign in to comment.