Skip to content

[Utils] Fix clang-tidy warning: Use boolean false, not 0 (NFC) #99828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

AZero13
Copy link
Contributor

@AZero13 AZero13 commented Jul 21, 2024

No description provided.

@AZero13 AZero13 marked this pull request as ready for review July 21, 2024 23:35
@llvmbot
Copy link
Member

llvmbot commented Jul 21, 2024

@llvm/pr-subscribers-llvm-transforms

@llvm/pr-subscribers-backend-directx

Author: AtariDreams (AtariDreams)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/99828.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Utils/DXILResource.cpp (+2-2)
diff --git a/llvm/lib/Transforms/Utils/DXILResource.cpp b/llvm/lib/Transforms/Utils/DXILResource.cpp
index bf45654a591b5..fdc009b241521 100644
--- a/llvm/lib/Transforms/Utils/DXILResource.cpp
+++ b/llvm/lib/Transforms/Utils/DXILResource.cpp
@@ -329,8 +329,8 @@ std::pair<uint32_t, uint32_t> ResourceInfo::getAnnotateProps() const {
   uint32_t ResourceKind = llvm::to_underlying(Kind);
   uint32_t AlignLog2 = isStruct() ? Log2(Struct.Alignment) : 0;
   bool IsUAV = isUAV();
-  bool IsROV = IsUAV ? UAVFlags.IsROV : 0;
-  bool IsGloballyCoherent = IsUAV ? UAVFlags.GloballyCoherent : 0;
+  bool IsROV = IsUAV ? UAVFlags.IsROV : false;
+  bool IsGloballyCoherent = IsUAV ? UAVFlags.GloballyCoherent : false;
   uint8_t SamplerCmpOrHasCounter = 0;
   if (IsUAV)
     SamplerCmpOrHasCounter = UAVFlags.HasCounter;

@AZero13 AZero13 changed the title [Utils] Use boolean false, not 0 (NFC) [Utils] Fix clang-tidy warning: Use boolean false, not 0 (NFC) Jul 22, 2024
@AZero13
Copy link
Contributor Author

AZero13 commented Jul 23, 2024

@bogner I do not have commit perms by the way. Thank you!

@bogner bogner merged commit 786b491 into llvm:main Jul 23, 2024
7 checks passed
@bogner
Copy link
Contributor

bogner commented Jul 23, 2024

@bogner I do not have commit perms by the way. Thank you!

Committed it for you. Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants