[clang] [clang][bytecode][NFC] Use InlineDescriptor ctor instead of manual init (PR #233348)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 18 23:09:28 PDT 2026
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/233348
None
>From 6c9e7ddd98cdde4968a6ca8c601a94608677c596 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Mon, 19 Oct 2026 08:08:04 +0200
Subject: [PATCH] [clang][bytecode][NFC] Use InlineDescriptor ctor instead of
manual init
---
clang/lib/AST/ByteCode/EvalEmitter.cpp | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
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();
More information about the cfe-commits
mailing list