@@ -1858,11 +1858,11 @@ bool Sema::CheckSpanLikeType(const AttributeCommonInfo &CI,
18581858 if (!RD || RD->isUnion ())
18591859 return emitWarning (diag::note_returned_not_struct);
18601860 auto FieldsBegin = RD->field_begin ();
1861- const auto FieldsCount = std::distance (FieldsBegin, RD->field_end ());
1861+ auto FieldsCount = std::distance (FieldsBegin, RD->field_end ());
18621862 if (FieldsCount != 2 )
18631863 return emitWarning (diag::note_returned_not_two_field_struct) << FieldsCount;
1864- const QualType FirstFieldType = FieldsBegin->getType ();
1865- const QualType SecondFieldType = std::next (FieldsBegin)->getType ();
1864+ QualType FirstFieldType = FieldsBegin->getType ();
1865+ QualType SecondFieldType = std::next (FieldsBegin)->getType ();
18661866 auto validatePointerType = [](const QualType &T) {
18671867 // It must not point to functions.
18681868 return T->isPointerType () && !T->isFunctionPointerType ();
@@ -1872,7 +1872,7 @@ bool Sema::CheckSpanLikeType(const AttributeCommonInfo &CI,
18721872 const auto *BT = dyn_cast<BuiltinType>(T.getCanonicalType ());
18731873 if (!BT || !BT->isInteger ())
18741874 return emitWarning (diag::note_returned_not_integer_field) << FieldNo;
1875- const auto IntSize = Context.getTypeSize (Context.IntTy );
1875+ auto IntSize = Context.getTypeSize (Context.IntTy );
18761876 if (Context.getTypeSize (BT) < IntSize)
18771877 return emitWarning (diag::note_returned_not_wide_enough_field)
18781878 << FieldNo << IntSize;
0 commit comments