[clang] [clang][bytecode][NFC] Use InlineDescriptor ctor instead of manual init (PR #233348)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 18 23:10:05 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/233348.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/EvalEmitter.cpp (+1-7)
``````````diff
diff --git a/clang/lib/AST/ByteCode/EvalEmitter.cpp b/clang/lib/AST/ByteCode/EvalEmitter.cpp
index 72ed8ad1f7a83..065db6141aa63 100644
--- a/clang/lib/AST/ByteCode/EvalEmitter.cpp
+++ b/clang/lib/AST/ByteCode/EvalEmitter.cpp
@@ -157,13 +157,7 @@ Scope::Local EvalEmitter::createLocal(const Descriptor *D) {
// Initialize local variable inline descriptor.
auto &Desc = B->getBlockDesc<InlineDescriptor>();
- Desc.Desc = D;
- Desc.Offset = sizeof(InlineDescriptor);
- Desc.IsActive = false;
- Desc.IsBase = false;
- Desc.IsFieldMutable = false;
- Desc.IsConst = false;
- Desc.IsInitialized = false;
+ new (&Desc) InlineDescriptor(D);
// Register the local.
unsigned Off = Locals.size();
``````````
</details>
https://github.com/llvm/llvm-project/pull/233348
More information about the cfe-commits
mailing list