diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:08 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:08 +0000 |
commit | 0564cdb94a7a1facbb0dbf888ceb90638aa70ecd (patch) | |
tree | 3ccbf1ba827928fca93419d0b6cf83ce0f650f2a /test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp | |
parent | dbabdb5220c44e5938d404eefb84b5ed55667ea8 (diff) |
Notes
Diffstat (limited to 'test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp')
-rw-r--r-- | test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp b/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp index 6bd8a4f1e610..d96ca3225aa3 100644 --- a/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp +++ b/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp @@ -19,6 +19,7 @@ #include <cstdint> #include <cstdlib> #include <type_traits> +#include "test_macros.h" constexpr struct { int x; @@ -137,7 +138,7 @@ int main() // LWG#2837 { auto res1 = std::lcm(static_cast<std::int64_t>(1234), INT32_MIN); - (void)std::lcm(INT_MIN, 2UL); // this used to trigger UBSAN + TEST_IGNORE_NODISCARD std::lcm(INT_MIN, 2UL); // this used to trigger UBSAN static_assert(std::is_same_v<decltype(res1), std::int64_t>, ""); assert(res1 == 1324997410816LL); } |