[PATCH] D32309: [libcxx] [test] Resolve compiler warnings in LCM/GCD tests

Casey Carter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 30 03:06:42 PDT 2017


CaseyCarter added inline comments.


================
Comment at: test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp:144
+    auto res1 = std::lcm(static_cast<std::int64_t>(1234), INT32_MIN);
+    (void)std::lcm(INT_MIN, 2UL);	// this used to trigger UBSAN
+    static_assert(std::is_same<decltype(res1), std::int64_t>::value, "");
----------------
`INT_MIN` is in `<climits>` .


https://reviews.llvm.org/D32309





More information about the cfe-commits mailing list