@@ -4261,11 +4261,8 @@ QualType ASTContext::getVariableArrayDecayedType(QualType type) const {
42614261 case Type::DependentSizedArray: {
42624262 const auto *dat = cast<DependentSizedArrayType>(ty);
42634263 result = getDependentSizedArrayType(
4264- getVariableArrayDecayedType(dat->getElementType()),
4265- dat->getSizeExpr(),
4266- dat->getSizeModifier(),
4267- dat->getIndexTypeCVRQualifiers(),
4268- dat->getBracketsRange());
4264+ getVariableArrayDecayedType(dat->getElementType()), dat->getSizeExpr(),
4265+ dat->getSizeModifier(), dat->getIndexTypeCVRQualifiers());
42694266 break;
42704267 }
42714268
@@ -4324,11 +4321,10 @@ QualType ASTContext::getVariableArrayType(QualType EltTy, Expr *NumElts,
43244321/// getDependentSizedArrayType - Returns a non-unique reference to
43254322/// the type for a dependently-sized array of the specified element
43264323/// type.
4327- QualType ASTContext::getDependentSizedArrayType(QualType elementType,
4328- Expr *numElements,
4329- ArraySizeModifier ASM,
4330- unsigned elementTypeQuals,
4331- SourceRange brackets) const {
4324+ QualType
4325+ ASTContext::getDependentSizedArrayType(QualType elementType, Expr *numElements,
4326+ ArraySizeModifier ASM,
4327+ unsigned elementTypeQuals) const {
43324328 assert((!numElements || numElements->isTypeDependent() ||
43334329 numElements->isValueDependent()) &&
43344330 "Size must be type- or value-dependent!");
@@ -4354,7 +4350,7 @@ QualType ASTContext::getDependentSizedArrayType(QualType elementType,
43544350
43554351 auto *newType = new (*this, alignof(DependentSizedArrayType))
43564352 DependentSizedArrayType(elementType, QualType(), numElements, ASM,
4357- elementTypeQuals, brackets );
4353+ elementTypeQuals);
43584354 DependentSizedArrayTypes.InsertNode(newType, insertPos);
43594355 Types.push_back(newType);
43604356 return QualType(newType, 0);
@@ -4364,7 +4360,7 @@ QualType ASTContext::getDependentSizedArrayType(QualType elementType,
43644360 if (!canonTy) {
43654361 canonTy = new (*this, alignof(DependentSizedArrayType))
43664362 DependentSizedArrayType(QualType(canonElementType.Ty, 0), QualType(),
4367- numElements, ASM, elementTypeQuals, brackets );
4363+ numElements, ASM, elementTypeQuals);
43684364 DependentSizedArrayTypes.InsertNode(canonTy, insertPos);
43694365 Types.push_back(canonTy);
43704366 }
@@ -4383,7 +4379,7 @@ QualType ASTContext::getDependentSizedArrayType(QualType elementType,
43834379 // of the element type.
43844380 auto *sugaredType = new (*this, alignof(DependentSizedArrayType))
43854381 DependentSizedArrayType(elementType, canon, numElements, ASM,
4386- elementTypeQuals, brackets );
4382+ elementTypeQuals);
43874383 Types.push_back(sugaredType);
43884384 return QualType(sugaredType, 0);
43894385}
@@ -6784,8 +6780,7 @@ QualType ASTContext::getUnqualifiedArrayType(QualType type,
67846780
67856781 const auto *DSAT = cast<DependentSizedArrayType>(AT);
67866782 return getDependentSizedArrayType(unqualElementType, DSAT->getSizeExpr(),
6787- DSAT->getSizeModifier(), 0,
6788- SourceRange());
6783+ DSAT->getSizeModifier(), 0);
67896784}
67906785
67916786/// Attempt to unwrap two types that may both be array types with the same bound
@@ -7729,12 +7724,9 @@ const ArrayType *ASTContext::getAsArrayType(QualType T) const {
77297724 IAT->getIndexTypeCVRQualifiers()));
77307725
77317726 if (const auto *DSAT = dyn_cast<DependentSizedArrayType>(ATy))
7732- return cast<ArrayType>(
7733- getDependentSizedArrayType(NewEltTy,
7734- DSAT->getSizeExpr(),
7735- DSAT->getSizeModifier(),
7736- DSAT->getIndexTypeCVRQualifiers(),
7737- DSAT->getBracketsRange()));
7727+ return cast<ArrayType>(getDependentSizedArrayType(
7728+ NewEltTy, DSAT->getSizeExpr(), DSAT->getSizeModifier(),
7729+ DSAT->getIndexTypeCVRQualifiers()));
77387730
77397731 const auto *VAT = cast<VariableArrayType>(ATy);
77407732 return cast<ArrayType>(getVariableArrayType(NewEltTy,
@@ -13846,10 +13838,7 @@ static QualType getCommonNonSugarTypeNode(ASTContext &Ctx, const Type *X,
1384613838 return Ctx.getDependentSizedArrayType(
1384713839 getCommonArrayElementType(Ctx, AX, QX, AY, QY),
1384813840 getCommonSizeExpr(Ctx, AX, AY), getCommonSizeModifier(AX, AY),
13849- getCommonIndexTypeCVRQualifiers(AX, AY),
13850- AX->getBracketsRange() == AY->getBracketsRange()
13851- ? AX->getBracketsRange()
13852- : SourceRange());
13841+ getCommonIndexTypeCVRQualifiers(AX, AY));
1385313842 }
1385413843 case Type::ConstantArray: {
1385513844 const auto *AX = cast<ConstantArrayType>(X),
0 commit comments