[PATCH] D75443: [AST] Unpack FPFeatures bits to BinaryOperator, NFC.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 07:58:37 PDT 2020


sammccall added a subscriber: sepavloff.
sammccall added a comment.

this looks reasonable to me, would like to give @mibintc and also @sepavloff a chance to chime in.



================
Comment at: clang/include/clang/Basic/LangOptions.h:437
+                                   LangOptions::FPExceptionModeKind EM) {
+    static_assert(LangOptions::FPExceptionModeKind::FPE_Strict <
+                      MaxExceptionValue,
----------------
This assertion seems weird, and it doesn't test much - new enum values are typically added at the end.


================
Comment at: clang/include/clang/Basic/LangOptions.h:460
+  // rounding_and_exceptions = MaxExceptionValue * rounding + exceptions.
+  constexpr static unsigned MaxExceptionValue = 3;
+  unsigned rounding_and_exceptions: 4;
----------------
nit: NumExceptionModes ?
(It's not the max value, it's max + 1)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75443/new/

https://reviews.llvm.org/D75443





More information about the cfe-commits mailing list