[libc-commits] [PATCH] D129918: [libc] Add utility classes for checking exceptional values.

Jeff Bailey via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jul 19 20:49:33 PDT 2022

jeffbailey added inline comments.

Comment at: libc/src/__support/FPUtil/except_value_utils.h:54
+  static bool check(const ExceptionalValues &ExceptionalValues, UIntType x_bits,
+                    T &result) {
lntue wrote:
> sivachandra wrote:
> > Because of the name like `check`, I was thinking this is a test utility. May be call it `expect_value_output` or something like that?
> > 
> > Also, @jeffbailey is working on an equivalent of `std::optional`: https://reviews.llvm.org/D129920. It seems like using it here would be appropriate? 
> > 
> > Lastly, does it have to be a static method - can it not be a non-static method? Then, you can name the method just `get_output`?
> I updated the patch to use `cpp::Optional` from @jeffbailey patch https://reviews.llvm.org/D129920, and change these to standalone methods. 
Since the interface is from the C++ standard and I know the thing works based on our tz variable parsing tests, I could commit what I have in that patch and then do the changes that I want to do for better conformance in a follow-up patch.

  rG LLVM Github Monorepo



More information about the libc-commits mailing list