[all-commits] [llvm/llvm-project] 9d3f23: [clang][bytecode] Don't start record field lifetim...

Timm Baeder via All-commits all-commits at lists.llvm.org
Tue Apr 28 05:58:20 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d3f2372ac5c5ffae124b402794acd8781a09280
      https://github.com/llvm/llvm-project/commit/9d3f2372ac5c5ffae124b402794acd8781a09280
  Author: Timm Baeder <tbaeder at redhat.com>
  Date:   2026-04-28 (Tue, 28 Apr 2026)

  Changed paths:
    M clang/lib/AST/ByteCode/Compiler.cpp
    M clang/lib/AST/ByteCode/Descriptor.cpp
    M clang/lib/AST/ByteCode/Descriptor.h
    M clang/lib/AST/ByteCode/EvalEmitter.cpp
    M clang/lib/AST/ByteCode/Interp.cpp
    M clang/lib/AST/ByteCode/Interp.h
    M clang/lib/AST/ByteCode/InterpBuiltinBitCast.cpp
    M clang/lib/AST/ByteCode/InterpFrame.h
    M clang/lib/AST/ByteCode/Opcodes.td
    M clang/lib/AST/ByteCode/Pointer.cpp
    M clang/test/AST/ByteCode/builtin-bit-cast-bitfields.cpp
    M clang/test/AST/ByteCode/new-delete.cpp
    M clang/test/AST/ByteCode/records.cpp

  Log Message:
  -----------
  [clang][bytecode] Don't start record field lifetime by default (#193496)

Even though we have per-field lifetime information we did not previously
diagnose this test:
```c++
  struct R {
    struct Inner { constexpr int f() const { return 0; } };
    int a = b.f();
    Inner b;
  };
  constexpr R r;
```
because the life time was started by default.

This patch makes record members be `Lifetime::NotStarted` by default
(unless they are primitive arrays) and then starts the lifetime when in
`Pointer::initialize()`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list