[clang] [clang][bytecode][NFC] Use an existing local variable (PR #152710)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 8 06:16:23 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
Instead of calling getSize() again.
---
Full diff: https://github.com/llvm/llvm-project/pull/152710.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/InterpState.cpp (+1-1)
``````````diff
diff --git a/clang/lib/AST/ByteCode/InterpState.cpp b/clang/lib/AST/ByteCode/InterpState.cpp
index 5593531bdabe3..32f940c262325 100644
--- a/clang/lib/AST/ByteCode/InterpState.cpp
+++ b/clang/lib/AST/ByteCode/InterpState.cpp
@@ -94,7 +94,7 @@ void InterpState::deallocate(Block *B) {
auto *D = new (Memory) DeadBlock(DeadBlocks, B);
// Since the block doesn't hold any actual data anymore, we can just
// memcpy() everything over.
- std::memcpy(D->rawData(), B->rawData(), B->getSize());
+ std::memcpy(D->rawData(), B->rawData(), Size);
D->B.IsInitialized = false;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/152710
More information about the cfe-commits
mailing list