[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as 337885 after changing `constexpr` -> `TEST_CONSTEXPR_CXX14` https://reviews.llvm.org/D49773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 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. Otherwise, I'm quite happy with this patch. The only downside I see is if `testComparisons6` fails, it will report the source of the failure as being in the header, and not provide

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > Can they be non-constexpr in C++11 and still function? Sure. I'll fix that. https://reviews.llvm.org/D49773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Some of this stuff is marked `constexpr` despite it requiring C++14 constexpr semantics. Can they be non-constexpr in C++11 and still function? Or should the header explicitly require C++14 to be included? https://reviews.llvm.org/D49773

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Usage looks like this: AssertComparisons6AreNoexcept(); AssertComparisons6ReturnBool(); static_assert(testComparisons6Values( 5U, 5U), ""); static_assert(testComparisons6Values( 5U, 10U), ""); static_assert(testComparisons6Values(10U, 5U), "");

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added reviewers: ldionne, EricWF. As I've been plowing through the `` stuff, I found myself writing tests to make sure that the comparisons for a bunch of different types are "sane". So I factored them out into something that can be used over and