================
@@ -47,6 +47,15 @@ enum class RoundingMode : int8_t {
Invalid = -1 ///< Denotes invalid value.
};
+inline bool isValidRoundingMode(int X) {
+ return X >= 0 && X <= static_cast<int>(RoundingMode::Dynamic);
----------------
andykaylor wrote:
This isn't a sufficient check. For instance, 5 and 6 are invalid but are less
than RoundingMode::Dynamic. I don't know why RoundingMode::Dynamic is defined
the way it is, but it's set to 7.
https://github.com/llvm/llvm-project/pull/109798
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits