Revert "[libc] Use best-fit binary trie to make malloc logarithmic" (#117065)
[llvm-project.git] / libcxx / test / std / numerics / c.math / abs.verify.cpp
blobdec80762b214fea88e0cdfadcf10bead6513ec12
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include <cmath>
11 void f() {
12 unsigned int ui = -5;
13 (void)std::abs(ui); // expected-error {{call to 'abs' is ambiguous}}
15 unsigned char uc = -5;
16 (void)std::abs(uc); // expected-warning {{taking the absolute value of unsigned type 'unsigned char' has no effect}}
18 unsigned short us = -5;
19 (void)std::abs(us); // expected-warning {{taking the absolute value of unsigned type 'unsigned short' has no effect}}
21 unsigned long ul = -5;
22 (void)std::abs(ul); // expected-error {{call to 'abs' is ambiguous}}
24 unsigned long long ull = -5;
25 (void)std::abs(ull); // expected-error {{call to 'abs' is ambiguous}}