diff options
author | Louis Dionne <ldionne@apple.com> | 2019-09-04 13:35:03 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-09-04 13:35:03 +0000 |
commit | b92deded87ad2a98d331d23fca98a03b70c15022 (patch) | |
tree | e85a7de1b005e6f9675e32a4687535519ce9e4fa /libcxx/test | |
parent | 052297524624db02eff91252c582037dc99c0528 (diff) | |
download | bcm5719-llvm-b92deded87ad2a98d331d23fca98a03b70c15022.tar.gz bcm5719-llvm-b92deded87ad2a98d331d23fca98a03b70c15022.zip |
[libc++] Move __clamp_to_integral to <cmath>, and harden against min()/max() macros
llvm-svn: 370900
Diffstat (limited to 'libcxx/test')
-rw-r--r-- | libcxx/test/libcxx/numerics/c.math/undef_min_max.pass.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libcxx/test/libcxx/numerics/c.math/undef_min_max.pass.cpp b/libcxx/test/libcxx/numerics/c.math/undef_min_max.pass.cpp new file mode 100644 index 00000000000..ba1696eb240 --- /dev/null +++ b/libcxx/test/libcxx/numerics/c.math/undef_min_max.pass.cpp @@ -0,0 +1,19 @@ +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-W#warnings" +#endif + +#define min THIS IS A NASTY MACRO! +#define max THIS IS A NASTY MACRO! + +#include <cmath> + +#include "test_macros.h" + +int main(int, char**) { return 0; } |