This is refactored from https://reviews.llvm.org/D123154.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/src/__support/FPUtil/except_value_utils.h | ||
---|---|---|
41 | Oops, copy-paste error! Fixed. |
libc/src/__support/FPUtil/except_value_utils.h | ||
---|---|---|
43–46 | May be use a struct? template <typename T> struct ExceptValueOuput { T rnd_towardzero_result; T rnd_upward_offset; T rnd_downward_offset; T rnd_nearest_offset; } | |
55 | 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? | |
58 | I still see typos and improper naming conventions - for example, I think you want to using ExceptionalValues here and not ExceptValues? Which makes wonder if this is being sufficiently tested? If not in use, just remove it? | |
79 | Can you add documentation about this method so that it is clear as to why it there at all? |
libc/src/__support/FPUtil/except_value_utils.h | ||
---|---|---|
55 | I updated the patch to use cpp::Optional from @jeffbailey patch https://reviews.llvm.org/D129920, and change these to standalone methods. |
libc/src/__support/FPUtil/except_value_utils.h | ||
---|---|---|
55 | 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. |
Can you please add documentation about the need and how to use this class?