hwright added inline comments.
================
Comment at: clang-tidy/abseil/DurationFactoryFloatCheck.cpp:27
+ double value = FloatLiteral.getValueAsApproximateDouble();
+ if (std::fmod(value, 1) == 0) {
+ bool is_negative = false;
----------------
alexfh wrote:
> Probably doesn't matter much, but would `std::modf` be more appropriate in
> this context?
I'm not actually sure. Since we're checking the remainder against `0`, we
don't need to also separately get the integral part, since if the conditional
passes, we know the original value //is// the integral part. It would seem
that `std::modf` just adds more complexity.
https://reviews.llvm.org/D53339
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits