@@ -4272,17 +4272,17 @@ QualType ASTContext::getVariableArrayDecayedType(QualType type) const {
42724272 result =
42734273 getVariableArrayType(getVariableArrayDecayedType(iat->getElementType()),
42744274 /*size*/ nullptr, ArraySizeModifier::Normal,
4275- iat->getIndexTypeCVRQualifiers(), SourceRange() );
4275+ iat->getIndexTypeCVRQualifiers());
42764276 break;
42774277 }
42784278
42794279 // Turn VLA types into [*] types.
42804280 case Type::VariableArray: {
42814281 const auto *vat = cast<VariableArrayType>(ty);
4282- result = getVariableArrayType(
4283- getVariableArrayDecayedType(vat->getElementType()),
4284- /*size*/ nullptr, ArraySizeModifier::Star,
4285- vat->getIndexTypeCVRQualifiers(), vat->getBracketsRange ());
4282+ result =
4283+ getVariableArrayType( getVariableArrayDecayedType(vat->getElementType()),
4284+ /*size*/ nullptr, ArraySizeModifier::Star,
4285+ vat->getIndexTypeCVRQualifiers ());
42864286 break;
42874287 }
42884288 }
@@ -4295,8 +4295,7 @@ QualType ASTContext::getVariableArrayDecayedType(QualType type) const {
42954295/// variable array of the specified element type.
42964296QualType ASTContext::getVariableArrayType(QualType EltTy, Expr *NumElts,
42974297 ArraySizeModifier ASM,
4298- unsigned IndexTypeQuals,
4299- SourceRange Brackets) const {
4298+ unsigned IndexTypeQuals) const {
43004299 // Since we don't unique expressions, it isn't possible to unique VLA's
43014300 // that have an expression provided for their size.
43024301 QualType Canon;
@@ -4306,12 +4305,12 @@ QualType ASTContext::getVariableArrayType(QualType EltTy, Expr *NumElts,
43064305 if (!EltTy.isCanonical() || EltTy.hasLocalQualifiers()) {
43074306 SplitQualType canonSplit = getCanonicalType(EltTy).split();
43084307 Canon = getVariableArrayType(QualType(canonSplit.Ty, 0), NumElts, ASM,
4309- IndexTypeQuals, Brackets );
4308+ IndexTypeQuals);
43104309 Canon = getQualifiedType(Canon, canonSplit.Quals);
43114310 }
43124311
43134312 auto *New = new (*this, alignof(VariableArrayType))
4314- VariableArrayType(EltTy, Canon, NumElts, ASM, IndexTypeQuals, Brackets );
4313+ VariableArrayType(EltTy, Canon, NumElts, ASM, IndexTypeQuals);
43154314
43164315 VariableArrayTypes.push_back(New);
43174316 Types.push_back(New);
@@ -6771,11 +6770,9 @@ QualType ASTContext::getUnqualifiedArrayType(QualType type,
67716770 }
67726771
67736772 if (const auto *VAT = dyn_cast<VariableArrayType>(AT)) {
6774- return getVariableArrayType(unqualElementType,
6775- VAT->getSizeExpr(),
6773+ return getVariableArrayType(unqualElementType, VAT->getSizeExpr(),
67766774 VAT->getSizeModifier(),
6777- VAT->getIndexTypeCVRQualifiers(),
6778- VAT->getBracketsRange());
6775+ VAT->getIndexTypeCVRQualifiers());
67796776 }
67806777
67816778 const auto *DSAT = cast<DependentSizedArrayType>(AT);
@@ -7729,11 +7726,9 @@ const ArrayType *ASTContext::getAsArrayType(QualType T) const {
77297726 DSAT->getIndexTypeCVRQualifiers()));
77307727
77317728 const auto *VAT = cast<VariableArrayType>(ATy);
7732- return cast<ArrayType>(getVariableArrayType(NewEltTy,
7733- VAT->getSizeExpr(),
7734- VAT->getSizeModifier(),
7735- VAT->getIndexTypeCVRQualifiers(),
7736- VAT->getBracketsRange()));
7729+ return cast<ArrayType>(
7730+ getVariableArrayType(NewEltTy, VAT->getSizeExpr(), VAT->getSizeModifier(),
7731+ VAT->getIndexTypeCVRQualifiers()));
77377732}
77387733
77397734QualType ASTContext::getAdjustedParameterType(QualType T) const {
0 commit comments