Author: Kazu Hirata Date: 2025-07-05T10:44:52-07:00 New Revision: 430c0376c8a0bc427d8de09d6af2a68e6bf93caa
URL: https://github.com/llvm/llvm-project/commit/430c0376c8a0bc427d8de09d6af2a68e6bf93caa DIFF: https://github.com/llvm/llvm-project/commit/430c0376c8a0bc427d8de09d6af2a68e6bf93caa.diff LOG: [Sema] Remove an unnecessary cast (NFC) (#147154) BitWidth is already of Expr *. Added: Modified: clang/lib/Sema/SemaDecl.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index d0e9bef58ddee..11cbda412667f 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -18636,8 +18636,7 @@ ExprResult Sema::VerifyBitField(SourceLocation FieldLoc, << FieldName << FieldTy << BitWidth->getSourceRange(); return Diag(FieldLoc, diag::err_not_integral_type_anon_bitfield) << FieldTy << BitWidth->getSourceRange(); - } else if (DiagnoseUnexpandedParameterPack(const_cast<Expr *>(BitWidth), - UPPC_BitFieldWidth)) + } else if (DiagnoseUnexpandedParameterPack(BitWidth, UPPC_BitFieldWidth)) return ExprError(); // If the bit-width is type- or value-dependent, don't try to check _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits