Guard the disabled tests with a macro rather than #if 0

Clang-Tidy's readability-avoid-unconditional-preprocessor-if rejects a literal
#if 0. Use a macro that is never defined instead, which the check does not
look at. Still temporary, and reverted together with the previous commit.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-08-31 14:20:37 +00:00
parent e1dfc65814
commit bfaf253f09
3 changed files with 9 additions and 6 deletions
+3 -2
View File
@@ -19,8 +19,9 @@
// TEMPORARY: this translation unit is disabled to narrow down an AppVeyor
// failure on MSVC 2015/2017 whose build log this environment cannot reach.
// The guard is removed again as soon as the cause is known.
#if 0
// The macro is deliberately never defined; the guard is removed again as soon
// as the cause is known.
#ifdef JSON_BISECT_CUSTOM_CONTAINER_TESTS
namespace
{
+3 -2
View File
@@ -23,8 +23,9 @@
// TEMPORARY: this translation unit is disabled to narrow down an AppVeyor
// failure on MSVC 2015/2017 whose build log this environment cannot reach.
// The guard is removed again as soon as the cause is known.
#if 0
// The macro is deliberately never defined; the guard is removed again as soon
// as the cause is known.
#ifdef JSON_BISECT_CUSTOM_CONTAINER_TESTS
namespace
{
+3 -2
View File
@@ -19,8 +19,9 @@
// TEMPORARY: this translation unit is disabled to narrow down an AppVeyor
// failure on MSVC 2015/2017 whose build log this environment cannot reach.
// The guard is removed again as soon as the cause is known.
#if 0
// The macro is deliberately never defined; the guard is removed again as soon
// as the cause is known.
#ifdef JSON_BISECT_CUSTOM_CONTAINER_TESTS
namespace
{