Skip to content

Fix signed/unsigned mismatch in LinAlgTests.cpp#8336

Merged
damyanp merged 2 commits intomicrosoft:mainfrom
damyanp:user/damyanp/fix-linalg-signed-unsigned-mismatch
Apr 3, 2026
Merged

Fix signed/unsigned mismatch in LinAlgTests.cpp#8336
damyanp merged 2 commits intomicrosoft:mainfrom
damyanp:user/damyanp/fix-linalg-signed-unsigned-mismatch

Conversation

@damyanp
Copy link
Copy Markdown
Member

@damyanp damyanp commented Apr 3, 2026

Change loop variables from int32_t to size_t to match the NumElements parameter type (size_t), fixing C4018 warnings treated as errors in x86 builds.

Assisted-By: Copilot

Change loop variables from int32_t to size_t to match the NumElements
parameter type (size_t), fixing C4018 warnings treated as errors in
x86 builds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 475e3ccc4bf1d749e88bcc4b6cecba8bd93a81ed e9b6aa2b62432058f4549e817ea07b6caec87562 -- tools/clang/unittests/HLSLExec/LinAlgTests.cpp
View the diff from clang-format here.
diff --git a/tools/clang/unittests/HLSLExec/LinAlgTests.cpp b/tools/clang/unittests/HLSLExec/LinAlgTests.cpp
index 96f4aa88..3ab1ac1d 100644
--- a/tools/clang/unittests/HLSLExec/LinAlgTests.cpp
+++ b/tools/clang/unittests/HLSLExec/LinAlgTests.cpp
@@ -235,7 +235,8 @@ static VariantCompType makeExpected(ComponentType CompType, size_t NumElements,
              "Value too large to cast to int32_t");
     std::vector<int32_t> Ints(NumElements);
     for (size_t I = 0; I < NumElements; I++)
-      Ints[I] = static_cast<int32_t>(StartingVal) + static_cast<int32_t>(Increment ? I : 0);
+      Ints[I] = static_cast<int32_t>(StartingVal) +
+                static_cast<int32_t>(Increment ? I : 0);
     return Ints;
   }
   case ComponentType::F16: {
  • Check this box to apply formatting changes to this branch.

@damyanp damyanp enabled auto-merge (squash) April 3, 2026 19:29
@damyanp damyanp merged commit e12898c into microsoft:main Apr 3, 2026
10 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants