summaryrefslogtreecommitdiff
path: root/clang/lib/AST/Interp/ByteCodeExprGen.cpp
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2024-03-31 22:43:06 -0700
committerVitaly Buka <vitalybuka@google.com>2024-03-31 22:43:06 -0700
commit7aced1ab9772075ef9a77b1ba4a6456968f27906 (patch)
tree995152f5bc707d6c2160f92a879eb52f8fc2a3a9 /clang/lib/AST/Interp/ByteCodeExprGen.cpp
parentfd7a6d054b1e027c036a1cff5ddc7ee81461f90a (diff)
parent1e442ac4c33ac36d33e191c2d18ff594d8a5d11a (diff)
Created using spr 1.3.4 [skip ci]
Diffstat (limited to 'clang/lib/AST/Interp/ByteCodeExprGen.cpp')
-rw-r--r--clang/lib/AST/Interp/ByteCodeExprGen.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
index 73831eefba45..46182809810b 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -819,7 +819,7 @@ bool ByteCodeExprGen<Emitter>::VisitImplicitValueInitExpr(const ImplicitValueIni
const ArrayType *AT = QT->getAsArrayTypeUnsafe();
assert(AT);
const auto *CAT = cast<ConstantArrayType>(AT);
- size_t NumElems = CAT->getSize().getZExtValue();
+ size_t NumElems = CAT->getZExtSize();
PrimType ElemT = classifyPrim(CAT->getElementType());
for (size_t I = 0; I != NumElems; ++I) {
@@ -992,7 +992,7 @@ bool ByteCodeExprGen<Emitter>::VisitInitListExpr(const InitListExpr *E) {
if (const Expr *Filler = E->getArrayFiller()) {
const ConstantArrayType *CAT =
Ctx.getASTContext().getAsConstantArrayType(E->getType());
- uint64_t NumElems = CAT->getSize().getZExtValue();
+ uint64_t NumElems = CAT->getZExtSize();
for (; ElementIndex != NumElems; ++ElementIndex) {
if (!this->visitArrayElemInit(ElementIndex, Filler))
@@ -1318,7 +1318,7 @@ bool ByteCodeExprGen<Emitter>::VisitStringLiteral(const StringLiteral *E) {
// If the initializer string is too long, a diagnostic has already been
// emitted. Read only the array length from the string literal.
- unsigned ArraySize = CAT->getSize().getZExtValue();
+ unsigned ArraySize = CAT->getZExtSize();
unsigned N = std::min(ArraySize, E->getLength());
size_t CharWidth = E->getCharByteWidth();
@@ -1919,7 +1919,7 @@ bool ByteCodeExprGen<Emitter>::VisitCXXConstructExpr(
const ConstantArrayType *CAT =
Ctx.getASTContext().getAsConstantArrayType(E->getType());
assert(CAT);
- size_t NumElems = CAT->getSize().getZExtValue();
+ size_t NumElems = CAT->getZExtSize();
const Function *Func = getFunction(E->getConstructor());
if (!Func || !Func->isConstexpr())
return false;