[clang[[Interp][NFC] Make some Descriptor pointers const
authorTimm Bäder <tbaeder@redhat.com>
Wed, 26 Apr 2023 08:52:01 +0000 (10:52 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Wed, 26 Apr 2023 08:57:43 +0000 (10:57 +0200)
clang/lib/AST/Interp/Pointer.cpp

index 8f1dfa3..7f12714 100644 (file)
@@ -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)
@@ -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()) {