[clang] a31b3a1 - [clang[[Interp][NFC] Make some Descriptor pointers const
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 26 01:57:53 PDT 2023
Author: Timm Bäder
Date: 2023-04-26T10:57:43+02:00
New Revision: a31b3a1a6d60cbb2ca9a110e70f0592aac574f1f
URL: https://github.com/llvm/llvm-project/commit/a31b3a1a6d60cbb2ca9a110e70f0592aac574f1f
DIFF: https://github.com/llvm/llvm-project/commit/a31b3a1a6d60cbb2ca9a110e70f0592aac574f1f.diff
LOG: [clang[[Interp][NFC] Make some Descriptor pointers const
Added:
Modified:
clang/lib/AST/Interp/Pointer.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/Pointer.cpp b/clang/lib/AST/Interp/Pointer.cpp
index 8f1dfa346c63..7f127143a99d 100644
--- a/clang/lib/AST/Interp/Pointer.cpp
+++ b/clang/lib/AST/Interp/Pointer.cpp
@@ -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()) {
More information about the cfe-commits
mailing list