Skip to content

Commit 32d16b6

Browse files
committed
[clang][Sema][NFC] Remove an unnecessary static_cast
1 parent fc865c2 commit 32d16b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Sema/SemaDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18215,8 +18215,8 @@ ExprResult Sema::VerifyBitField(SourceLocation FieldLoc,
1821518215
/// to create a FieldDecl object for it.
1821618216
Decl *Sema::ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart,
1821718217
Declarator &D, Expr *BitfieldWidth) {
18218-
FieldDecl *Res = HandleField(S, cast_or_null<RecordDecl>(TagD),
18219-
DeclStart, D, static_cast<Expr*>(BitfieldWidth),
18218+
FieldDecl *Res = HandleField(S, cast_if_present<RecordDecl>(TagD), DeclStart,
18219+
D, BitfieldWidth,
1822018220
/*InitStyle=*/ICIS_NoInit, AS_public);
1822118221
return Res;
1822218222
}

0 commit comments

Comments
 (0)