Skip to content

Commit

Permalink
[clang[[Interp][NFC] Make some Descriptor pointers const
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Apr 26, 2023
1 parent 5794ea4 commit a31b3a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/lib/AST/Interp/Pointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ APValue Pointer::toAPValue() const {

bool Pointer::isInitialized() const {
assert(Pointee && "Cannot check if null pointer was initialized");
Descriptor *Desc = getFieldDesc();
const Descriptor *Desc = getFieldDesc();
assert(Desc);
if (Desc->isPrimitiveArray()) {
if (isStatic() && Base == 0)
Expand All @@ -167,7 +167,7 @@ bool Pointer::isInitialized() const {

void Pointer::initialize() const {
assert(Pointee && "Cannot initialize null pointer");
Descriptor *Desc = getFieldDesc();
const Descriptor *Desc = getFieldDesc();

assert(Desc);
if (Desc->isPrimitiveArray()) {
Expand Down

0 comments on commit a31b3a1

Please sign in to comment.