]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Support clang-format 14
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 6 Sep 2022 07:12:45 +0000 (09:12 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 6 Sep 2022 07:12:45 +0000 (09:12 +0200)
clang-format 14 chokes on a construction in unittest/test_Stat.cpp. Work
around this by moving ifdefs around.

unittest/test_Stat.cpp

index 688656040a6c13cdebb4897ccc475d6f27165445..b7e6178aae7fcf3ec319fda19e89678f073cc40a 100644 (file)
@@ -512,9 +512,9 @@ TEST_CASE("Special" * doctest::skip(running_under_wine()))
 #endif
   }
 
-#ifdef _WIN32
   SUBCASE("block device")
   {
+#ifdef _WIN32
     auto stat = Stat::stat("\\\\.\\C:");
     CHECK(stat);
     CHECK(stat.error_number() == 0);
@@ -524,8 +524,8 @@ TEST_CASE("Special" * doctest::skip(running_under_wine()))
     CHECK(S_ISBLK(stat.mode()));
     CHECK(stat.file_attributes() == 0);
     CHECK(stat.reparse_tag() == 0);
-  }
 #endif
+  }
 }
 
 #ifdef _WIN32