https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/149339
getExceptionMode() already returns LangOptions::FPExceptionModeKind. >From 3d531ee0626a226ff3db60c8bf04a447cea6727e Mon Sep 17 00:00:00 2001 From: Kazu Hirata <k...@google.com> Date: Thu, 17 Jul 2025 08:10:15 -0700 Subject: [PATCH] [CodeGen] Remove an unnecessary cast (NFC) getExceptionMode() already returns LangOptions::FPExceptionModeKind. --- clang/lib/CodeGen/CodeGenFunction.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 776a646ceb32f..0fda31c8e5fa1 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -161,8 +161,7 @@ void CodeGenFunction::CGFPOptionsRAII::ConstructorHelper(FPOptions FPFeatures) { llvm::RoundingMode NewRoundingBehavior = FPFeatures.getRoundingMode(); CGF.Builder.setDefaultConstrainedRounding(NewRoundingBehavior); auto NewExceptionBehavior = - ToConstrainedExceptMD(static_cast<LangOptions::FPExceptionModeKind>( - FPFeatures.getExceptionMode())); + ToConstrainedExceptMD(FPFeatures.getExceptionMode()); CGF.Builder.setDefaultConstrainedExcept(NewExceptionBehavior); CGF.SetFastMathFlags(FPFeatures); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits