[clang] [clang][bytecode][NFC] Remove unnecessary loop variable (PR #207649)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 5 21:19:55 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

No reason to have the extra `N`.

---
Full diff: https://github.com/llvm/llvm-project/pull/207649.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 090bbf4596413..77e9efbbabb85 100644
--- a/clang/lib/AST/ByteCode/Compiler.cpp
+++ b/clang/lib/AST/ByteCode/Compiler.cpp
@@ -3822,7 +3822,7 @@ bool Compiler<Emitter>::VisitCXXScalarValueInitExpr(
     PrimType ElemT = classifyPrim(ElemQT);
 
     // Initialize all fields to 0.
-    for (unsigned I = 0, N = NumElems; I != N; ++I) {
+    for (unsigned I = 0; I != NumElems; ++I) {
       if (!this->visitZeroInitializer(ElemT, ElemQT, E))
         return false;
       if (!this->emitInitElem(ElemT, I, E))

``````````

</details>


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


More information about the cfe-commits mailing list