Balance the warning suppression the split separated

unit-regression2.cpp opens a DOCTEST_CLANG_SUPPRESS_WARNING_PUSH block at
the top and closed it at the very bottom, which the split moved into
unit-regression3.cpp: one file was left with a push and no pop, the other
with a pop and no push, which clang reports as an error.

Give each file the pair it needs.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-08-21 01:01:57 +02:00
parent 540f6d11cc
commit 4fd940f91b
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -1240,3 +1240,5 @@ TEST_CASE("regression tests 2")
}
#endif
}
DOCTEST_CLANG_SUPPRESS_WARNING_POP
+4
View File
@@ -32,6 +32,10 @@ using ordered_json = nlohmann::ordered_json;
#include <string>
#include <vector>
// NLOHMANN_JSON_SERIALIZE_ENUM uses a static std::pair
DOCTEST_CLANG_SUPPRESS_WARNING_PUSH
DOCTEST_CLANG_SUPPRESS_WARNING("-Wexit-time-destructors")
TEST_CASE_TEMPLATE("issue #4798 - nlohmann::json::to_msgpack() encode float NaN as double", T, double, float) // NOLINT(readability-math-missing-parentheses, bugprone-throwing-static-initialization)
{
// With issue #4798, we encode NaN, infinity, and -infinity as float instead