[all-commits] [llvm/llvm-project] b7660a: [clang][bytecode] Fix const-in-mutable fields (#14...

Timm Baeder via All-commits all-commits at lists.llvm.org
Fri Jul 18 02:21:11 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b7660a54157fd45e6276acf35176851196f5df71
      https://github.com/llvm/llvm-project/commit/b7660a54157fd45e6276acf35176851196f5df71
  Author: Timm Baeder <tbaeder at redhat.com>
  Date:   2025-07-18 (Fri, 18 Jul 2025)

  Changed paths:
    M clang/lib/AST/ByteCode/Descriptor.cpp
    M clang/lib/AST/ByteCode/Descriptor.h
    M clang/lib/AST/ByteCode/Disasm.cpp
    M clang/lib/AST/ByteCode/Interp.cpp
    M clang/lib/AST/ByteCode/Pointer.h
    M clang/test/AST/ByteCode/mutable.cpp

  Log Message:
  -----------
  [clang][bytecode] Fix const-in-mutable fields (#149286)

For mutable and const fields, we have two bits in InlineDescriptor,
which both get inherited down the hierarchy. When a field is both const
and mutable, we CAN read from it if it is a mutable-in-const field, but
we _can't_ read from it if it is a const-in-mutable field. We need
another bit to distinguish the two cases.



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