diff --git a/clang/lib/AST/ByteCode/Program.cpp b/clang/lib/AST/ByteCode/Program.cpp index 0da518ec92afa..04e0b1884e3d6 100644 --- a/clang/lib/AST/ByteCode/Program.cpp +++ b/clang/lib/AST/ByteCode/Program.cpp @@ -399,10 +399,10 @@ Descriptor *Program::createDescriptor(const DeclTy &D, const Type *Ty, } // Arrays. - if (const auto ArrayType = Ty->getAsArrayTypeUnsafe()) { + if (const auto *ArrayType = Ty->getAsArrayTypeUnsafe()) { QualType ElemTy = ArrayType->getElementType(); // Array of well-known bounds. - if (auto CAT = dyn_cast(ArrayType)) { + if (const auto *CAT = dyn_cast(ArrayType)) { size_t NumElems = CAT->getZExtSize(); if (std::optional T = Ctx.classify(ElemTy)) { // Arrays of primitives.