Skip to content

[clang] Remove FEM_Indeterminable #137661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/FPOptions.def
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ OPTION(NoHonorInfs, bool, 1, NoHonorNaNs)
OPTION(NoSignedZero, bool, 1, NoHonorInfs)
OPTION(AllowReciprocal, bool, 1, NoSignedZero)
OPTION(AllowApproxFunc, bool, 1, AllowReciprocal)
OPTION(FPEvalMethod, LangOptions::FPEvalMethodKind, 3, AllowApproxFunc)
OPTION(FPEvalMethod, LangOptions::FPEvalMethodKind, 2, AllowApproxFunc)
OPTION(Float16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod)
OPTION(BFloat16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, Float16ExcessPrecision)
OPTION(MathErrno, bool, 1, BFloat16ExcessPrecision)
Expand Down
16 changes: 1 addition & 15 deletions clang/include/clang/Basic/LangOptions.def
Original file line number Diff line number Diff line change
Expand Up @@ -347,21 +347,7 @@ BENIGN_ENUM_LANGOPT(DefaultFPContractMode, FPModeKind, 2, FPM_Off, "FP contracti
COMPATIBLE_LANGOPT(ExpStrictFP, 1, false, "Enable experimental strict floating point")
BENIGN_LANGOPT(RoundingMath, 1, false, "Do not assume default floating-point rounding behavior")
BENIGN_ENUM_LANGOPT(FPExceptionMode, FPExceptionModeKind, 2, FPE_Default, "FP Exception Behavior Mode type")

#if defined(__clang__) && defined(__has_warning)
#if __has_warning("-Wpreferred-type-bitfield-enum-conversion")
// FIXME: Remove this once the warning is fixed, https://llvm.org/PR137600
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpreferred-type-bitfield-enum-conversion"
#endif
#endif
BENIGN_ENUM_LANGOPT(FPEvalMethod, FPEvalMethodKind, 3, FEM_UnsetOnCommandLine, "FP type used for floating point arithmetic")
#if defined(__clang__) && defined(__has_warning)
#if __has_warning("-Wpreferred-type-bitfield-enum-conversion")
#pragma clang diagnostic pop
#endif
#endif

BENIGN_ENUM_LANGOPT(FPEvalMethod, FPEvalMethodKind, 2, FEM_UnsetOnCommandLine, "FP type used for floating point arithmetic")
ENUM_LANGOPT(Float16ExcessPrecision, ExcessPrecisionKind, 2, FPP_Standard, "Intermediate truncation behavior for Float16 arithmetic")
ENUM_LANGOPT(BFloat16ExcessPrecision, ExcessPrecisionKind, 2, FPP_Standard, "Intermediate truncation behavior for BFloat16 arithmetic")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field type alignment")
Expand Down
20 changes: 1 addition & 19 deletions clang/include/clang/Basic/LangOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,6 @@ class LangOptionsBase {

LangOptionsBase() = default;

#if defined(__clang__) && defined( __has_warning)
#if __has_warning("-Wpreferred-type-bitfield-enum-conversion")
// FIXME: Remove this once the warning is fixed, https://llvm.org/PR137600
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpreferred-type-bitfield-enum-conversion"
#endif
#endif
LangOptionsBase(const LangOptionsBase&) = default;
LangOptionsBase& operator=(const LangOptionsBase&) = default;
#if defined(__clang__) && defined( __has_warning)
#if __has_warning("-Wpreferred-type-bitfield-enum-conversion")
#pragma clang diagnostic pop
#endif
#endif

enum GCMode { NonGC, GCOnly, HybridGC };
enum StackProtectorMode { SSPOff, SSPOn, SSPStrong, SSPReq };

Expand Down Expand Up @@ -321,10 +306,7 @@ class LangOptionsBase {
};

/// Possible float expression evaluation method choices.
enum FPEvalMethodKind {
/// The evaluation method cannot be determined or is inconsistent for this
/// target.
FEM_Indeterminable = -1,
enum FPEvalMethodKind : unsigned {
/// Use the declared type for fp arithmetic.
FEM_Source = 0,
/// Use the type double for fp arithmetic.
Expand Down
Loading