diff options
author | Kazu Hirata <kazu@google.com> | 2023-03-24 13:01:52 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-03-24 13:01:52 -0700 |
commit | 5a9bad171be5dfdf9430a0f6cbff14d29ca54181 (patch) | |
tree | 2563ff00c2096b55dc2265322977c6c7f626e41a | |
parent | 4cb0b7ce3b4987446264312d582dac9c9a98a488 (diff) | |
download | llvm-5a9bad171be5dfdf9430a0f6cbff14d29ca54181.zip llvm-5a9bad171be5dfdf9430a0f6cbff14d29ca54181.tar.gz llvm-5a9bad171be5dfdf9430a0f6cbff14d29ca54181.tar.bz2 |
[Support] Fix warnings
This patch fixes:
llvm/unittests/Support/ScopedPrinterTest.cpp:519:20: error: unused
variable 'InfDouble' [-Werror,-Wunused-variable]
llvm/unittests/Support/ScopedPrinterTest.cpp:520:16: error: unused
variable 'NaNDouble' [-Werror,-Wunused-variable]
llvm/unittests/Support/ScopedPrinterTest.cpp:516:15: error: unused
variable 'NaNFloat' [-Werror,-Wunused-variable]
llvm/unittests/Support/ScopedPrinterTest.cpp:515:19: error: unused
variable 'InfFloat' [-Werror,-Wunused-variable]
Since commit fa56e362af475e0758cfb41c42f78db50da7235c has temporarily
disabled tests involving these constants, this patch simply comments
them out instead of removing them.
-rw-r--r-- | llvm/unittests/Support/ScopedPrinterTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/unittests/Support/ScopedPrinterTest.cpp b/llvm/unittests/Support/ScopedPrinterTest.cpp index 48600cd..1b2d03b 100644 --- a/llvm/unittests/Support/ScopedPrinterTest.cpp +++ b/llvm/unittests/Support/ScopedPrinterTest.cpp @@ -512,12 +512,12 @@ FirstSecondThirdByteMask [ (0x333) TEST_F(ScopedPrinterTest, PrintNumber) { constexpr float MaxFloat = std::numeric_limits<float>::max(); constexpr float MinFloat = std::numeric_limits<float>::min(); - constexpr float InfFloat = std::numeric_limits<float>::infinity(); - const float NaNFloat = std::nanf("1"); + // constexpr float InfFloat = std::numeric_limits<float>::infinity(); + // const float NaNFloat = std::nanf("1"); constexpr double MaxDouble = std::numeric_limits<double>::max(); constexpr double MinDouble = std::numeric_limits<double>::min(); - constexpr double InfDouble = std::numeric_limits<double>::infinity(); - const double NaNDouble = std::nan("1"); + // constexpr double InfDouble = std::numeric_limits<double>::infinity(); + // const double NaNDouble = std::nan("1"); auto PrintFunc = [&](ScopedPrinter &W) { uint64_t Unsigned64Max = std::numeric_limits<uint64_t>::max(); |