[llvm-branch-commits] [llvm] [DirectX] Making sure we always parse, validate and verify Flags (PR #162171)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Oct 6 15:08:48 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/Frontend/HLSL/RootSignatureMetadata.cpp llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Frontend/HLSL/RootSignatureMetadata.cpp b/llvm/lib/Frontend/HLSL/RootSignatureMetadata.cpp
index 3296dbb01..3d1ce147c 100644
--- a/llvm/lib/Frontend/HLSL/RootSignatureMetadata.cpp
+++ b/llvm/lib/Frontend/HLSL/RootSignatureMetadata.cpp
@@ -731,11 +731,11 @@ Error MetadataParser::validateRootSignature(
           hlsl::rootsig::verifyRootDescriptorFlag(
               RSD.Version, dxbc::RootDescriptorFlags(Descriptor.Flags));
       if (!IsValidFlag)
-        DeferredErrs = joinErrors(
-            std::move(DeferredErrs),
-            createRSError(RSErrorKind::Validation,
-                          StringRef("RootDescriptorFlag"), Descriptor.Flags));
-      
+        DeferredErrs = joinErrors(std::move(DeferredErrs),
+                                  createRSError(RSErrorKind::Validation,
+                                                StringRef("RootDescriptorFlag"),
+                                                Descriptor.Flags));
+
       break;
     }
     case dxbc::RootParameterType::DescriptorTable: {
diff --git a/llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp b/llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp
index 2b35b1e3a..1735751de 100644
--- a/llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp
+++ b/llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp
@@ -116,7 +116,6 @@ bool verifyStaticSamplerFlags(uint32_t Version,
   if (Version <= 2)
     return Flags == dxbc::StaticSamplerFlags::None;
 
-
   dxbc::StaticSamplerFlags Mask =
       dxbc::StaticSamplerFlags::NonNormalizedCoordinates |
       dxbc::StaticSamplerFlags::UintBorderColor |

``````````

</details>


https://github.com/llvm/llvm-project/pull/162171


More information about the llvm-branch-commits mailing list