-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc++] Implement P2614R2 (Deprecate numeric_limits::has_denorm)
Reviewed By: #libc, ldionne Spies: ldionne, Mordante, libcxx-commits Differential Revision: https://reviews.llvm.org/D155411
- Loading branch information
1 parent
5d8fb47
commit 0d7947b
Showing
9 changed files
with
145 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
libcxx/test/std/depr/depr.numeric.imits.has.denorm/deprecated.verify.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// 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 | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 | ||
|
||
// ADDITIONAL_COMPILE_FLAGS: -Wno-unused-value | ||
|
||
#include <limits> | ||
|
||
#include "type_algorithms.h" | ||
|
||
void func() { | ||
std::numeric_limits<bool>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<bool>::denorm_min(); | ||
|
||
std::numeric_limits<int>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<int>::denorm_min(); | ||
|
||
std::numeric_limits<float>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<float>::denorm_min(); | ||
|
||
std::numeric_limits<double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<double>::denorm_min(); | ||
|
||
std::numeric_limits<long double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<long double>::denorm_min(); | ||
|
||
std::numeric_limits<const bool>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<const bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<const bool>::denorm_min(); | ||
|
||
std::numeric_limits<const int>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<const int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<const int>::denorm_min(); | ||
|
||
std::numeric_limits<const float>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<const float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<const float>::denorm_min(); | ||
|
||
std::numeric_limits<const double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<const double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<const double>::denorm_min(); | ||
|
||
std::numeric_limits<const long double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<const long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<const long double>::denorm_min(); | ||
|
||
std::numeric_limits<volatile bool>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<volatile bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<volatile bool>::denorm_min(); | ||
|
||
std::numeric_limits<volatile int>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<volatile int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<volatile int>::denorm_min(); | ||
|
||
std::numeric_limits<volatile float>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<volatile float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<volatile float>::denorm_min(); | ||
|
||
std::numeric_limits<volatile double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<volatile double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<volatile double>::denorm_min(); | ||
|
||
std::numeric_limits<volatile long double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<volatile long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<volatile long double>::denorm_min(); | ||
|
||
std::numeric_limits<const volatile bool>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<const volatile bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<const volatile bool>::denorm_min(); | ||
|
||
std::numeric_limits<const volatile int>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<const volatile int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<const volatile int>::denorm_min(); | ||
|
||
std::numeric_limits<const volatile float>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<const volatile float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<const volatile float>::denorm_min(); | ||
|
||
std::numeric_limits<const volatile double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<const volatile double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<const volatile double>::denorm_min(); | ||
|
||
std::numeric_limits<const volatile long double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}} | ||
std::numeric_limits<const volatile long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} | ||
std::numeric_limits<const volatile long double>::denorm_min(); | ||
|
||
std::denorm_indeterminate; // expected-warning {{'denorm_indeterminate' is deprecated}} | ||
std::denorm_absent; // expected-warning {{'denorm_absent' is deprecated}} | ||
std::denorm_present; // expected-warning {{'denorm_present' is deprecated}} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters