[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith closed this revision. dexonsmith added a comment. Committed in r301060. https://reviews.llvm.org/D31561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Since I haven't heard from Marshall and Hal's fine with the less-future-proof std::is_floating_point, I'll commit that and we can iterate in tree. Just running tests. https://reviews.llvm.org/D31561 ___ cfe-commits

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Marshall, are you fine with figuring this out in-tree? Or should I revert to using `std::is_floating_point` for now? https://reviews.llvm.org/D31561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D31561#731498, @dexonsmith wrote: > Marshall, that's what I assumed originally, but I figured Hal had some > non-standard-but-worth-supporting use case in mind. In this case, future-proofing and mathematical precision seemed aligned. I

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Eric: somehow I never got an email notification for your review :/. If Marshall is okay with the current state, I'll document that before commit. https://reviews.llvm.org/D31561 ___ cfe-commits mailing list

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Marshall, that's what I assumed originally, but I figured Hal had some non-standard-but-worth-supporting use case in mind. Hal, what do you think? https://reviews.llvm.org/D31561 ___ cfe-commits mailing list

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: libcxx/include/math.h:400 +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if::value, int>::type +fpclassify(_A1 __lcpp_x) _NOEXCEPT hfinkel wrote: > Maybe we should predicate this, and

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM minus inline comments. Comment at: libcxx/include/math.h:354 inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-10 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a subscriber: mclow.lists. hfinkel added a comment. I'm happy with this now. @EricWF , @mclow.lists , thoughts? https://reviews.llvm.org/D31561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith marked 2 inline comments as done. dexonsmith added a comment. Marking Hal's comments as "Done". Thanks for the review. https://reviews.llvm.org/D31561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 94750. dexonsmith added a comment. Responding to Hal's comments. https://reviews.llvm.org/D31561 Files: libcxx/include/math.h libcxx/test/std/numerics/c.math/cmath.pass.cpp Index: libcxx/test/std/numerics/c.math/cmath.pass.cpp

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-10 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: libcxx/include/math.h:354 inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::value, bool>::type signbit(_A1 __lcpp_x) _NOEXCEPT

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Ping. https://reviews.llvm.org/D31561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-03-31 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. For std::isinf, the standard requires effectively calling isinf as double from Libc for integral types. But integral types are never infinite; we don't need to call Libc to return false. Also short-circuit other functions where Libc won't have