From cbdebaf4d9eb9350ee5b48b019d2415ccfdaa5bf Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 21 May 2026 13:07:33 -0700 Subject: [PATCH 1/7] fix modern MSVC --- tools/clang/unittests/HLSL/DxilContainerTest.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/clang/unittests/HLSL/DxilContainerTest.cpp b/tools/clang/unittests/HLSL/DxilContainerTest.cpp index 5869923802..9274898d3e 100644 --- a/tools/clang/unittests/HLSL/DxilContainerTest.cpp +++ b/tools/clang/unittests/HLSL/DxilContainerTest.cpp @@ -36,13 +36,21 @@ #include #include #pragma comment(lib, "d3dcompiler.lib") -#if _MSC_VER >= 1920 -#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING +#if defined(_MSC_VER) +// MSVC removed starting in VS 2019 16.3 (_MSC_VER >- 1922) +#if _MSC_VER < 1922 #include +namespace fs = std::experimental::filesystem; #else #include +namespace fs = std::filesystem; +#endif +#else +#include +namespace fs = std::filesystem; #endif #endif +using namespace fs; #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" @@ -72,7 +80,6 @@ using namespace std; using namespace hlsl_test; #ifdef _WIN32 -using namespace std::experimental::filesystem; static uint8_t MaskCount(uint8_t V) { DXASSERT_NOMSG(0 <= V && V <= 0xF); From 521ae422c84e3cdc94a50a4637d65d56b4885a1a Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 21 May 2026 15:47:40 -0700 Subject: [PATCH 2/7] repair --- .../unittests/HLSL/DxilContainerTest.cpp | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/tools/clang/unittests/HLSL/DxilContainerTest.cpp b/tools/clang/unittests/HLSL/DxilContainerTest.cpp index 9274898d3e..59c69a933c 100644 --- a/tools/clang/unittests/HLSL/DxilContainerTest.cpp +++ b/tools/clang/unittests/HLSL/DxilContainerTest.cpp @@ -36,21 +36,26 @@ #include #include #pragma comment(lib, "d3dcompiler.lib") + #if defined(_MSC_VER) -// MSVC removed starting in VS 2019 16.3 (_MSC_VER >- 1922) -#if _MSC_VER < 1922 -#include -namespace fs = std::experimental::filesystem; -#else -#include -namespace fs = std::filesystem; -#endif + // MSVC removed starting in VS 2019 16.3 (_MSC_VER >= 1922) + #if _MSC_VER < 1922 + #include + namespace fs = std::experimental::filesystem; + #else + #include + namespace fs = std::filesystem; + #endif +#elif defined(__has_include) && __has_include() && \ + (!defined(__GNUC__) || __GNUC__ >= 8) + #include + namespace fs = std::filesystem; #else -#include -namespace fs = std::filesystem; -#endif + #include + namespace fs = std::experimental::filesystem; #endif -using namespace fs; + + using namespace fs; #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" From b433d21f59020599ea517e9d435adf6a4de4b5c1 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 21 May 2026 15:52:24 -0700 Subject: [PATCH 3/7] format --- tools/clang/unittests/HLSL/DxilContainerTest.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/clang/unittests/HLSL/DxilContainerTest.cpp b/tools/clang/unittests/HLSL/DxilContainerTest.cpp index 59c69a933c..972229ece7 100644 --- a/tools/clang/unittests/HLSL/DxilContainerTest.cpp +++ b/tools/clang/unittests/HLSL/DxilContainerTest.cpp @@ -55,7 +55,7 @@ namespace fs = std::experimental::filesystem; #endif - using namespace fs; +using namespace fs; #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" @@ -85,7 +85,6 @@ using namespace std; using namespace hlsl_test; #ifdef _WIN32 - static uint8_t MaskCount(uint8_t V) { DXASSERT_NOMSG(0 <= V && V <= 0xF); static const uint8_t Count[16] = {0, 1, 1, 2, 1, 2, 2, 3, From 3aaa95da5370d25f99d943f57577d23e9e3109e6 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 21 May 2026 16:35:17 -0700 Subject: [PATCH 4/7] fix missing endif --- tools/clang/unittests/HLSL/DxilContainerTest.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/clang/unittests/HLSL/DxilContainerTest.cpp b/tools/clang/unittests/HLSL/DxilContainerTest.cpp index 972229ece7..aafc7c548e 100644 --- a/tools/clang/unittests/HLSL/DxilContainerTest.cpp +++ b/tools/clang/unittests/HLSL/DxilContainerTest.cpp @@ -36,6 +36,7 @@ #include #include #pragma comment(lib, "d3dcompiler.lib") +#endif #if defined(_MSC_VER) // MSVC removed starting in VS 2019 16.3 (_MSC_VER >= 1922) From 54e02abbd060c9f21a2ef13c6e12317b26b3847b Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 22 May 2026 10:48:57 -0700 Subject: [PATCH 5/7] fix macos --- .../clang/unittests/HLSL/DxilContainerTest.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/clang/unittests/HLSL/DxilContainerTest.cpp b/tools/clang/unittests/HLSL/DxilContainerTest.cpp index aafc7c548e..98153b2444 100644 --- a/tools/clang/unittests/HLSL/DxilContainerTest.cpp +++ b/tools/clang/unittests/HLSL/DxilContainerTest.cpp @@ -48,7 +48,7 @@ namespace fs = std::filesystem; #endif #elif defined(__has_include) && __has_include() && \ - (!defined(__GNUC__) || __GNUC__ >= 8) + (defined(__clang__) || !defined(__GNUC__) || __GNUC__ >= 8) #include namespace fs = std::filesystem; #else @@ -80,17 +80,17 @@ using namespace fs; #include -// clang-format on + // clang-format on -using namespace std; -using namespace hlsl_test; + using namespace std; + using namespace hlsl_test; #ifdef _WIN32 -static uint8_t MaskCount(uint8_t V) { - DXASSERT_NOMSG(0 <= V && V <= 0xF); - static const uint8_t Count[16] = {0, 1, 1, 2, 1, 2, 2, 3, - 1, 2, 2, 3, 2, 3, 3, 4}; - return Count[V]; + static uint8_t MaskCount(uint8_t V) { + DXASSERT_NOMSG(0 <= V && V <= 0xF); + static const uint8_t Count[16] = {0, 1, 1, 2, 1, 2, 2, 3, + 1, 2, 2, 3, 2, 3, 3, 4}; + return Count[V]; } #endif From 6b84fe13758506d2adbf3c5712bf454f1e75f75b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 22 May 2026 17:58:08 +0000 Subject: [PATCH 6/7] chore: autopublish 2026-05-22T17:58:08Z --- tools/clang/unittests/HLSL/DxilContainerTest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/clang/unittests/HLSL/DxilContainerTest.cpp b/tools/clang/unittests/HLSL/DxilContainerTest.cpp index 98153b2444..90c09c6613 100644 --- a/tools/clang/unittests/HLSL/DxilContainerTest.cpp +++ b/tools/clang/unittests/HLSL/DxilContainerTest.cpp @@ -80,17 +80,17 @@ using namespace fs; #include - // clang-format on +// clang-format on - using namespace std; - using namespace hlsl_test; +using namespace std; +using namespace hlsl_test; #ifdef _WIN32 - static uint8_t MaskCount(uint8_t V) { - DXASSERT_NOMSG(0 <= V && V <= 0xF); - static const uint8_t Count[16] = {0, 1, 1, 2, 1, 2, 2, 3, - 1, 2, 2, 3, 2, 3, 3, 4}; - return Count[V]; +static uint8_t MaskCount(uint8_t V) { + DXASSERT_NOMSG(0 <= V && V <= 0xF); + static const uint8_t Count[16] = {0, 1, 1, 2, 1, 2, 2, 3, + 1, 2, 2, 3, 2, 3, 3, 4}; + return Count[V]; } #endif From 65b2b855f460d0f6196551baea05ad861ef42d73 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 26 May 2026 11:56:18 -0700 Subject: [PATCH 7/7] address Helena --- tools/clang/unittests/HLSL/DxilContainerTest.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tools/clang/unittests/HLSL/DxilContainerTest.cpp b/tools/clang/unittests/HLSL/DxilContainerTest.cpp index 90c09c6613..82a833535a 100644 --- a/tools/clang/unittests/HLSL/DxilContainerTest.cpp +++ b/tools/clang/unittests/HLSL/DxilContainerTest.cpp @@ -39,21 +39,17 @@ #endif #if defined(_MSC_VER) - // MSVC removed starting in VS 2019 16.3 (_MSC_VER >= 1922) - #if _MSC_VER < 1922 + // MSVC removed starting in VS 2019 16.3 (_MSC_VER >= 1922) + #if (_MSC_VER >= 1920) && (_MSC_VER < 1922) #include namespace fs = std::experimental::filesystem; #else #include namespace fs = std::filesystem; #endif -#elif defined(__has_include) && __has_include() && \ - (defined(__clang__) || !defined(__GNUC__) || __GNUC__ >= 8) +#else #include namespace fs = std::filesystem; -#else - #include - namespace fs = std::experimental::filesystem; #endif using namespace fs;