[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 28 19:51:14 PDT 2018


rjmccall added inline comments.


================
Comment at: include/clang/Basic/FixedPoint.h:31
+  SatNoPadding,
+};
+
----------------
I figured you'd want this to be a struct which include the scale, width, signed-ness, and saturating-ness; and then `APFixedPoint` can just store one of these next to a bare `APInt`.


================
Comment at: include/clang/Basic/FixedPoint.h:41
+  APFixedPoint(const llvm::APSInt &Val, unsigned Scale,
+               enum FixedPointSemantics Sema)
+      : Val(Val), Scale(Scale), Sema(Sema) {}
----------------
Why the elaborated-type-specifier?


Repository:
  rC Clang

https://reviews.llvm.org/D48661





More information about the cfe-commits mailing list