Home | History | Annotate | Download | only in Sema

Lines Matching refs:Index

214 /// the initializer list one element at a time. The IList and Index
216 /// (syntactic) initializer list and the index into that initializer
218 /// responsible for moving that Index forward as it consumes elements.
222 /// initializer list and the index into that initializer list where we
244 unsigned &Index, InitListExpr *StructuredList,
253 unsigned &Index,
259 unsigned &Index,
264 unsigned &Index,
269 unsigned &Index,
274 unsigned &Index,
278 InitListExpr *IList, QualType DeclType, unsigned &Index,
284 bool SubobjectIsDesignatorContext, unsigned &Index,
291 bool SubobjectIsDesignatorContext, unsigned &Index,
300 unsigned &Index,
305 InitListExpr *getStructuredSubobjectInit(InitListExpr *IList, unsigned Index,
757 /// \p Index onwards can be used to initialize an object of type \p T. Update
758 /// \p Index to indicate how many elements of the list were consumed.
764 QualType T, unsigned &Index,
780 SemaRef.Diag(ParentIList->getInit(Index)->getLocStart(),
782 ++Index;
789 = getStructuredSubobjectInit(ParentIList, Index, T, StructuredList,
791 SourceRange(ParentIList->getInit(Index)->getLocStart(),
796 unsigned StartIndex = Index;
798 /*SubobjectIsDesignatorContext=*/false, Index,
805 unsigned EndIndex = (Index == StartIndex? StartIndex : Index - 1);
906 unsigned Index = 0, StructuredIndex = 0;
908 Index, StructuredList, StructuredIndex, TopLevelObject);
919 if (Index < IList->getNumInits()) {
939 SemaRef.Diag(IList->getInit(Index)->getLocStart(), DK)
940 << IList->getInit(Index)->getSourceRange();
962 SemaRef.Diag(IList->getInit(Index)->getLocStart(), DK)
963 << initKind << IList->getInit(Index)->getSourceRange();
976 unsigned &Index,
983 CheckComplexType(Entity, IList, DeclType, Index,
986 CheckScalarType(Entity, IList, DeclType, Index,
989 CheckVectorType(Entity, IList, DeclType, Index,
996 SubobjectIsDesignatorContext, Index,
1004 SubobjectIsDesignatorContext, Index,
1008 ++Index;
1014 CheckReferenceType(Entity, IList, DeclType, Index,
1032 unsigned &Index,
1035 Expr *expr = IList->getInit(Index);
1038 return CheckReferenceType(Entity, IList, ElemType, Index,
1048 = getStructuredSubobjectInit(IList, Index, ElemType,
1063 ++Index;
1074 ++Index;
1106 ++Index;
1113 return CheckScalarType(Entity, IList, ElemType, Index,
1126 ++Index;
1156 ++Index;
1171 CheckImplicitInitList(Entity, IList, ElemType, Index, StructuredList,
1182 ++Index;
1189 unsigned &Index,
1192 assert(Index == 0 && "Index in explicit init list must be zero");
1202 return CheckScalarType(Entity, IList, DeclType, Index, StructuredList,
1217 ElementEntity.setElementIndex(Index);
1218 CheckSubElementType(ElementEntity, IList, elementType, Index,
1226 unsigned &Index,
1229 if (Index >= IList->getNumInits()) {
1237 ++Index;
1242 Expr *expr = IList->getInit(Index);
1251 CheckScalarType(Entity, SubIList, DeclType, Index, StructuredList,
1260 ++Index;
1268 ++Index;
1285 IList->setInit(Index, ResultExpr);
1292 ++Index;
1297 unsigned &Index,
1300 if (Index >= IList->getNumInits()) {
1311 ++Index;
1316 Expr *expr = IList->getInit(Index);
1322 ++Index;
1330 ++Index;
1342 IList->setInit(Index, expr);
1348 ++Index;
1353 unsigned &Index,
1361 if (Index >= IList->getNumInits()) {
1373 Expr *Init = IList->getInit(Index);
1378 ++Index;
1394 IList->setInit(Index, ResultExpr);
1402 ++Index;
1411 if (Index >= IList->getNumInits()) {
1417 ElementEntity.setElementIndex(Index);
1418 CheckSubElementType(ElementEntity, IList, elementType, Index,
1470 if (Index >= IList->getNumInits())
1473 ElementEntity.setElementIndex(Index);
1475 QualType IType = IList->getInit(Index)->getType();
1477 CheckSubElementType(ElementEntity, IList, elementType, Index,
1490 CheckSubElementType(ElementEntity, IList, VecType, Index,
1510 unsigned &Index,
1516 if (Index < IList->getNumInits()) {
1517 if (IsStringInit(IList->getInit(Index), arrayType, SemaRef.Context) ==
1525 CheckStringInit(IList->getInit(Index), DeclType, arrayType, SemaRef);
1527 IList->getInit(Index));
1530 ++Index;
1543 ++Index;
1560 while (Index < IList->getNumInits()) {
1561 Expr *Init = IList->getInit(Index);
1572 DeclType, nullptr, &elementIndex, Index,
1602 CheckSubElementType(ElementEntity, IList, elementType, Index,
1680 unsigned &Index,
1690 ++Index;
1737 while (Index < IList->getNumInits()) {
1738 Expr *Init = IList->getInit(Index);
1750 DeclType, &Field, nullptr, Index,
1788 IList->getInit(Index)->getLocStart());
1790 ++Index;
1798 CheckSubElementType(MemberEntity, IList, Field->getType(), Index,
1839 Index >= IList->getNumInits())
1842 if (CheckFlexibleArrayInit(Entity, IList->getInit(Index), *Field,
1845 ++Index;
1852 if (isa<InitListExpr>(IList->getInit(Index)))
1853 CheckSubElementType(MemberEntity, IList, Field->getType(), Index,
1856 CheckImplicitInitList(MemberEntity, IList, Field->getType(), Index,
1927 /// resides at the given @p Index within the initializer list @p
1938 /// @param DesigIdx The index of the current designator.
1949 /// will be set to the last index initialized by this designator.
1951 /// @param Index Index into @p IList where the designated initializer
1967 unsigned &Index,
1979 unsigned OldIndex = Index;
1982 CheckSubElementType(Entity, IList, CurrentObjectType, Index,
2012 getStructuredSubobjectInit(IList, Index, CurrentObjectType,
2083 ++Index;
2108 ++Index;
2118 ++Index;
2139 ++Index;
2193 ++Index;
2245 ++Index;
2252 unsigned OldIndex = Index;
2253 IList->setInit(Index, DIE->getInit());
2257 CheckSubElementType(MemberEntity, IList, Field->getType(), Index,
2277 FieldType, nullptr, nullptr, Index,
2307 CheckStructUnionTypes(Entity, IList, CurrentObjectType, Field, false, Index,
2332 ++Index;
2375 ++Index;
2459 unsigned OldIndex = Index;
2467 Index = OldIndex;
2471 ElementType, nullptr, nullptr, Index,
2477 // Move to the next index in the array that we'll be initializing.
2497 /*SubobjectIsDesignatorContext=*/false, Index,
2505 InitListChecker::getStructuredSubobjectInit(InitListExpr *IList, unsigned Index,
2569 } else if (Index < IList->getNumInits()) {
2570 if (InitListExpr *SubList = dyn_cast<InitListExpr>(IList->getInit(Index))) {
2609 /// Update the initializer at index @p StructuredIndex within the
2642 /// Check that the given Index expression is a valid array designator
2646 /// failure. Returns the index expression, possibly with an implicit cast
2650 CheckArrayDesignatorExpr(Sema &S, Expr *Index, llvm::APSInt &Value) {
2651 SourceLocation Loc = Index->getLocStart();
2654 ExprResult Result = S.VerifyIntegerConstantExpression(Index, &Value);
2660 << Value.toString(10) << Index->getSourceRange();
2686 Expr *Index = static_cast<Expr *>(D.getArrayIndex());
2688 if (!Index->isTypeDependent() && !Index->isValueDependent())
2689 Index = CheckArrayDesignatorExpr(*this, Index, IndexValue).get();
2690 if (!Index)
2696 InitExpressions.push_back(Index);
2769 InitializedEntity::InitializedEntity(ASTContext &Context, unsigned Index,
2771 : Parent(&Parent), Index(Index)
2911 case EK_ArrayElement: OS << "ArrayElement " << Index; break;
2912 case EK_VectorElement: OS << "VectorElement " << Index; break;
2913 case EK_ComplexElement: OS << "ComplexElement " << Index; break;
4697 << ((unsigned) iik - 1) // shift index into diagnostic explanations
5884 unsigned Index = 0;
5886 if (Index >= ILE->getNumInits())
5890 Expr *SubInit = ILE->getInit(Index);
5899 ++Index;