[clang] [clang][bytecode][NFC] Avoid implicit integer conversion (PR #134983)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 9 02:44:45 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

See discussion in https://github.com/llvm/llvm-project/pull/134672

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


1 Files Affected:

- (modified) clang/lib/AST/ByteCode/Compiler.cpp (+1-1) 


``````````diff
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp
index e4f87d8b2af04..9f784cd504c76 100644
--- a/clang/lib/AST/ByteCode/Compiler.cpp
+++ b/clang/lib/AST/ByteCode/Compiler.cpp
@@ -6823,7 +6823,7 @@ bool Compiler<Emitter>::emitDestruction(const Descriptor *Desc,
         return true;
     }
 
-    if (size_t N = Desc->getNumElems()) {
+    if (unsigned N = Desc->getNumElems()) {
       for (ssize_t I = N - 1; I >= 0; --I) {
         if (!this->emitConstUint64(I, Loc))
           return false;

``````````

</details>


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


More information about the cfe-commits mailing list