Home | History | Annotate | Download | only in Sema

Lines Matching refs:Index

139 /// the initializer list one element at a time. The IList and Index
141 /// (syntactic) initializer list and the index into that initializer
143 /// responsible for moving that Index forward as it consumes elements.
147 /// initializer list and the index into that initializer list where we
168 unsigned &Index, InitListExpr *StructuredList,
173 unsigned &Index, InitListExpr *StructuredList,
179 unsigned &Index,
185 unsigned &Index,
190 unsigned &Index,
195 unsigned &Index,
199 InitListExpr *IList, QualType DeclType, unsigned &Index,
205 bool SubobjectIsDesignatorContext, unsigned &Index,
212 bool SubobjectIsDesignatorContext, unsigned &Index,
221 unsigned &Index,
226 InitListExpr *getStructuredSubobjectInit(InitListExpr *IList, unsigned Index,
485 QualType T, unsigned &Index,
501 SemaRef.Diag(ParentIList->getInit(Index)->getLocStart(),
503 ++Index;
510 = getStructuredSubobjectInit(ParentIList, Index, T, StructuredList,
512 SourceRange(ParentIList->getInit(Index)->getSourceRange().getBegin(),
517 unsigned StartIndex = Index;
519 /*SubobjectIsDesignatorContext=*/false, Index,
523 unsigned EndIndex = (Index == StartIndex? StartIndex : Index - 1);
549 unsigned &Index,
557 Index, StructuredList, StructuredIndex, TopLevelObject);
564 if (Index < IList->getNumInits()) {
574 SemaRef.Diag(IList->getInit(Index)->getLocStart(), DK)
575 << IList->getInit(Index)->getSourceRange();
597 SemaRef.Diag(IList->getInit(Index)->getLocStart(), DK)
598 << initKind << IList->getInit(Index)->getSourceRange();
613 unsigned &Index,
618 CheckScalarType(Entity, IList, DeclType, Index,
621 CheckVectorType(Entity, IList, DeclType, Index,
627 SubobjectIsDesignatorContext, Index,
635 SubobjectIsDesignatorContext, Index,
641 ++Index;
658 CheckReferenceType(Entity, IList, DeclType, Index,
674 unsigned &Index,
677 Expr *expr = IList->getInit(Index);
682 = getStructuredSubobjectInit(IList, Index, ElemType,
688 ++Index;
691 return CheckScalarType(Entity, IList, ElemType, Index,
694 return CheckReferenceType(Entity, IList, ElemType, Index,
706 ++Index;
732 ++Index;
759 ++Index;
774 CheckImplicitInitList(Entity, IList, ElemType, Index, StructuredList,
783 ++Index;
790 unsigned &Index,
793 if (Index >= IList->getNumInits()) {
797 ++Index;
802 Expr *expr = IList->getInit(Index);
808 CheckScalarType(Entity, SubIList, DeclType, Index, StructuredList,
816 ++Index;
834 IList->setInit(Index, ResultExpr);
841 ++Index;
846 unsigned &Index,
849 if (Index < IList->getNumInits()) {
850 Expr *expr = IList->getInit(Index);
855 ++Index;
868 IList->setInit(Index, expr);
874 ++Index;
885 ++Index;
893 unsigned &Index,
896 if (Index >= IList->getNumInits())
907 Expr *Init = IList->getInit(Index);
921 IList->setInit(Index, ResultExpr);
928 ++Index;
937 if (Index >= IList->getNumInits())
940 ElementEntity.setElementIndex(Index);
941 CheckSubElementType(ElementEntity, IList, elementType, Index,
953 if (Index >= IList->getNumInits())
956 ElementEntity.setElementIndex(Index);
958 QualType IType = IList->getInit(Index)->getType();
960 CheckSubElementType(ElementEntity, IList, elementType, Index,
973 CheckSubElementType(ElementEntity, IList, VecType, Index,
991 unsigned &Index,
997 if (Index < IList->getNumInits()) {
998 if (Expr *Str = IsStringInit(IList->getInit(Index), arrayType,
1008 ++Index;
1020 ++Index;
1037 while (Index < IList->getNumInits()) {
1038 Expr *Init = IList->getInit(Index);
1049 DeclType, 0, &elementIndex, Index,
1079 CheckSubElementType(ElementEntity, IList, elementType, Index,
1109 unsigned &Index,
1143 while (Index < IList->getNumInits()) {
1144 Expr *Init = IList->getInit(Index);
1156 DeclType, &Field, 0, Index,
1190 IList->getInit(Index)->getLocStart())) {
1191 ++Index;
1199 CheckSubElementType(MemberEntity, IList, Field->getType(), Index,
1227 Index >= IList->getNumInits())
1232 (!isa<InitListExpr>(IList->getInit(Index)) ||
1233 cast<InitListExpr>(IList->getInit(Index))->getNumInits() > 0)) {
1234 SemaRef.Diag(IList->getInit(Index)->getSourceRange().getBegin(),
1236 << IList->getInit(Index)->getSourceRange().getBegin();
1240 ++Index;
1243 SemaRef.Diag(IList->getInit(Index)->getSourceRange().getBegin(),
1245 << IList->getInit(Index)->getSourceRange().getBegin();
1253 if (isa<InitListExpr>(IList->getInit(Index)))
1254 CheckSubElementType(MemberEntity, IList, Field->getType(), Index,
1257 CheckImplicitInitList(MemberEntity, IList, Field->getType(), Index,
1310 /// resides at the given @p Index within the initializer list @p
1321 /// @param DesigIdx The index of the current designator.
1332 /// will be set to the last index initialized by this designator.
1334 /// @param Index Index into @p IList where the designated initializer
1350 unsigned &Index,
1362 unsigned OldIndex = Index;
1365 CheckSubElementType(Entity, IList, CurrentObjectType, Index,
1385 : getStructuredSubobjectInit(IList, Index, CurrentObjectType,
1408 ++Index;
1414 // need to compute the field's index.
1476 ++Index;
1487 ++Index;
1518 ++Index;
1570 ++Index;
1577 unsigned OldIndex = Index;
1578 IList->setInit(Index, DIE->getInit());
1582 CheckSubElementType(MemberEntity, IList, Field->getType(), Index,
1602 FieldType, 0, 0, Index,
1632 CheckStructUnionTypes(Entity, IList, CurrentObjectType, Field, false, Index,
1656 ++Index;
1698 ++Index;
1725 unsigned OldIndex = Index;
1733 Index = OldIndex;
1737 ElementType, 0, 0, Index,
1743 // Move to the next index in the array that we'll be initializing.
1763 /*SubobjectIsDesignatorContext=*/false, Index,
1771 InitListChecker::getStructuredSubobjectInit(InitListExpr *IList, unsigned Index,
1820 } else if (Index < IList->getNumInits()) {
1821 if (InitListExpr *SubList = dyn_cast<InitListExpr>(IList->getInit(Index))) {
1864 /// Update the initializer at index @p StructuredIndex within the
1888 /// Check that the given Index expression is a valid array designator
1896 CheckArrayDesignatorExpr(Sema &S, Expr *Index, llvm::APSInt &Value) {
1897 SourceLocation Loc = Index->getSourceRange().getBegin();
1900 if (S.VerifyIntegerConstantExpression(Index, &Value))
1905 << Value.toString(10) << Index->getSourceRange();
1931 Expr *Index = static_cast<Expr *>(D.getArrayIndex());
1933 if (!Index->isTypeDependent() &&
1934 !Index->isValueDependent() &&
1935 CheckArrayDesignatorExpr(*this, Index, IndexValue))
1941 InitExpressions.push_back(Index);
2023 InitializedEntity::InitializedEntity(ASTContext &Context, unsigned Index,
2025 : Parent(&Parent), Index(Index)
3288 << ((unsigned) iik - 1) // shift index into diagnostic explanations