[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 21:55:06 PDT 2022


tbaeder added inline comments.


================
Comment at: clang/lib/AST/Interp/Floating.h:33-34
+  /// Primitive representing limits.
+  // static constexpr auto Min = std::numeric_limits<float>::min();
+  // static constexpr auto Max = std::numeric_limits<float>::max();
+
----------------
jcranmer-intel wrote:
> tbaeder wrote:
> > This is currently commented out, but I //think// I can get the semantics of the `APFloat` and ask its semantics for min/max values.
> `APFloat::get{Largest,Smallest}` will do the trick.
I only need them for `isMin()`, so `isSmallest()` even works, thanks!


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

https://reviews.llvm.org/D134859



More information about the cfe-commits mailing list