Lines Matching refs:IList

331                              InitListExpr *IList, QualType &T,
335 InitListExpr *IList, QualType &DeclType,
342 InitListExpr *IList, QualType ElemType,
348 InitListExpr *IList, QualType DeclType,
353 InitListExpr *IList, QualType DeclType,
358 InitListExpr *IList, QualType DeclType,
363 InitListExpr *IList, QualType DeclType, unsigned &Index,
367 InitListExpr *IList, QualType DeclType,
375 InitListExpr *IList, QualType &DeclType,
381 InitListExpr *IList, DesignatedInitExpr *DIE,
391 InitListExpr *getStructuredSubobjectInit(InitListExpr *IList, unsigned Index,
1275 InitListExpr *IList, QualType &T, in CheckExplicitInitList() argument
1279 CheckListElementTypes(Entity, IList, T, /*SubobjectIsDesignatorContext=*/true, in CheckExplicitInitList()
1286 IList->setType(ExprTy); in CheckExplicitInitList()
1293 if (Index < IList->getNumInits() && !T->isIncompleteType()) { in CheckExplicitInitList()
1307 SemaRef.Diag(IList->getInit(Index)->getBeginLoc(), DK) in CheckExplicitInitList()
1308 << IList->getInit(Index)->getSourceRange(); in CheckExplicitInitList()
1313 SemaRef.Diag(IList->getInit(Index)->getBeginLoc(), DK) in CheckExplicitInitList()
1314 << T << IList->getInit(Index)->getSourceRange(); in CheckExplicitInitList()
1324 SemaRef.Diag(IList->getInit(Index)->getBeginLoc(), DK) in CheckExplicitInitList()
1325 << initKind << IList->getInit(Index)->getSourceRange(); in CheckExplicitInitList()
1330 if (T->isScalarType() && IList->getNumInits() == 1 && in CheckExplicitInitList()
1331 !isa<InitListExpr>(IList->getInit(0))) in CheckExplicitInitList()
1332 warnBracedScalarInit(SemaRef, Entity, IList->getSourceRange()); in CheckExplicitInitList()
1341 if (IList->getNumInits() == 0) { in CheckExplicitInitList()
1347 SemaRef.Diag(IList->getBeginLoc(), in CheckExplicitInitList()
1349 << IList->getSourceRange() << T; in CheckExplicitInitList()
1356 InitListExpr *IList, in CheckListElementTypes() argument
1366 CheckComplexType(Entity, IList, DeclType, Index, in CheckListElementTypes()
1369 CheckScalarType(Entity, IList, DeclType, Index, in CheckListElementTypes()
1372 CheckVectorType(Entity, IList, DeclType, Index, in CheckListElementTypes()
1386 CheckStructUnionTypes(Entity, IList, DeclType, Bases, RD->field_begin(), in CheckListElementTypes()
1393 CheckArrayType(Entity, IList, DeclType, Zero, in CheckListElementTypes()
1400 SemaRef.Diag(IList->getBeginLoc(), diag::err_illegal_initializer_type) in CheckListElementTypes()
1404 CheckReferenceType(Entity, IList, DeclType, Index, in CheckListElementTypes()
1408 SemaRef.Diag(IList->getBeginLoc(), diag::err_init_objc_class) << DeclType; in CheckListElementTypes()
1413 CheckScalarType(Entity, IList, DeclType, Index, StructuredList, in CheckListElementTypes()
1424 SemaRef.Diag(IList->getBeginLoc(), diag::err_illegal_initializer_type) in CheckListElementTypes()
1431 InitListExpr *IList, in CheckSubElementType() argument
1437 Expr *expr = IList->getInit(Index); in CheckSubElementType()
1440 return CheckReferenceType(Entity, IList, ElemType, Index, in CheckSubElementType()
1542 return CheckScalarType(Entity, IList, ElemType, Index, in CheckSubElementType()
1604 CheckImplicitInitList(Entity, IList, ElemType, Index, StructuredList, in CheckSubElementType()
1640 InitListExpr *IList, QualType DeclType, in CheckComplexType() argument
1653 if (IList->getNumInits() < 2) in CheckComplexType()
1654 return CheckScalarType(Entity, IList, DeclType, Index, StructuredList, in CheckComplexType()
1660 SemaRef.Diag(IList->getBeginLoc(), diag::ext_complex_component_init) in CheckComplexType()
1661 << IList->getSourceRange(); in CheckComplexType()
1670 CheckSubElementType(ElementEntity, IList, elementType, Index, in CheckComplexType()
1676 InitListExpr *IList, QualType DeclType, in CheckScalarType() argument
1680 if (Index >= IList->getNumInits()) { in CheckScalarType()
1684 SemaRef.Diag(IList->getBeginLoc(), in CheckScalarType()
1688 << DeclType << IList->getSourceRange(); in CheckScalarType()
1690 SemaRef.Diag(IList->getBeginLoc(), in CheckScalarType()
1694 << IList->getSourceRange(); in CheckScalarType()
1704 Expr *expr = IList->getInit(Index); in CheckScalarType()
1751 IList->setInit(Index, ResultExpr); in CheckScalarType()
1763 InitListExpr *IList, QualType DeclType, in CheckReferenceType() argument
1767 if (Index >= IList->getNumInits()) { in CheckReferenceType()
1773 SemaRef.Diag(IList->getBeginLoc(), in CheckReferenceType()
1775 << DeclType << IList->getSourceRange(); in CheckReferenceType()
1782 Expr *expr = IList->getInit(Index); in CheckReferenceType()
1785 SemaRef.Diag(IList->getBeginLoc(), diag::err_init_non_aggr_init_list) in CheckReferenceType()
1786 << DeclType << IList->getSourceRange(); in CheckReferenceType()
1811 IList->setInit(Index, expr); in CheckReferenceType()
1820 InitListExpr *IList, QualType DeclType, in CheckVectorType() argument
1829 if (Index >= IList->getNumInits()) { in CheckVectorType()
1833 IList->getEndLoc()); in CheckVectorType()
1840 Expr *Init = IList->getInit(Index); in CheckVectorType()
1863 IList->setInit(Index, ResultExpr); in CheckVectorType()
1878 if (Index >= IList->getNumInits()) { in CheckVectorType()
1879 CheckEmptyInitializable(ElementEntity, IList->getEndLoc()); in CheckVectorType()
1884 CheckSubElementType(ElementEntity, IList, elementType, Index, in CheckVectorType()
1905 SemaRef.Diag(IList->getBeginLoc(), in CheckVectorType()
1920 SemaRef.Diag(IList->getBeginLoc(), in CheckVectorType()
1936 if (Index >= IList->getNumInits()) in CheckVectorType()
1941 QualType IType = IList->getInit(Index)->getType(); in CheckVectorType()
1943 CheckSubElementType(ElementEntity, IList, elementType, Index, in CheckVectorType()
1956 CheckSubElementType(ElementEntity, IList, VecType, Index, in CheckVectorType()
1965 SemaRef.Diag(IList->getBeginLoc(), in CheckVectorType()
2030 InitListExpr *IList, QualType &DeclType, in CheckArrayType() argument
2040 IList->getEndLoc(), SemaRef)) { in CheckArrayType()
2046 if (canInitializeArrayWithEmbedDataString(IList->inits(), Entity, in CheckArrayType()
2048 EmbedExpr *Embed = cast<EmbedExpr>(IList->inits()[0]); in CheckArrayType()
2049 IList->setInit(0, Embed->getDataStringLiteral()); in CheckArrayType()
2053 if (Index < IList->getNumInits()) { in CheckArrayType()
2054 if (IsStringInit(IList->getInit(Index), arrayType, SemaRef.Context) == in CheckArrayType()
2063 CheckStringInit(IList->getInit(Index), DeclType, arrayType, SemaRef, in CheckArrayType()
2068 IList->getInit(Index)); in CheckArrayType()
2081 bool HasErr = IList->getNumInits() != 0 || SemaRef.getLangOpts().CPlusPlus; in CheckArrayType()
2116 while (Index < IList->getNumInits()) { in CheckArrayType()
2117 Expr *Init = IList->getInit(Index); in CheckArrayType()
2127 if (CheckDesignatedInitializer(Entity, IList, DIE, 0, in CheckArrayType()
2159 CheckSubElementType(ElementEntity, IList, elementType, Index, in CheckArrayType()
2185 SemaRef.Diag(IList->getBeginLoc(), diag::ext_typecheck_zero_array_size); in CheckArrayType()
2200 IList->getEndLoc()); in CheckArrayType()
2239 const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, in CheckStructUnionTypes() argument
2255 if (RD->isUnion() && IList->getNumInits() == 0) { in CheckStructUnionTypes()
2259 if (checkDestructorReference(ET, IList->getEndLoc(), SemaRef)) { in CheckStructUnionTypes()
2290 IList->getEndLoc()); in CheckStructUnionTypes()
2304 Expr *Init = Index < IList->getNumInits() ? IList->getInit(Index) : nullptr; in CheckStructUnionTypes()
2331 if (Index < IList->getNumInits()) in CheckStructUnionTypes()
2332 Index = IList->getNumInits(); in CheckStructUnionTypes()
2339 SourceLocation InitLoc = Init ? Init->getBeginLoc() : IList->getEndLoc(); in CheckStructUnionTypes()
2343 CheckSubElementType(BaseEntity, IList, Base.getType(), Index, in CheckStructUnionTypes()
2369 while (Index < IList->getNumInits()) { in CheckStructUnionTypes()
2370 Expr *Init = IList->getInit(Index); in CheckStructUnionTypes()
2385 Entity, IList, DIE, 0, DeclType, &Field, nullptr, Index, in CheckStructUnionTypes()
2420 if (IList->getNumInits() == 1) { in CheckStructUnionTypes()
2462 *Field, IList->getInit(Index)->getBeginLoc()); in CheckStructUnionTypes()
2480 CheckSubElementType(MemberEntity, IList, Field->getType(), Index, in CheckStructUnionTypes()
2499 !IList->isIdiomaticZeroInitializer(SemaRef.getLangOpts()) && in CheckStructUnionTypes()
2515 SemaRef.Diag(IList->getSourceRange().getEnd(), Diag) << *it; in CheckStructUnionTypes()
2529 IList->getEndLoc()); in CheckStructUnionTypes()
2541 if (checkDestructorReference(ET, IList->getEndLoc(), SemaRef)) { in CheckStructUnionTypes()
2549 Index >= IList->getNumInits()) in CheckStructUnionTypes()
2552 if (CheckFlexibleArrayInit(Entity, IList->getInit(Index), *Field, in CheckStructUnionTypes()
2562 if (isa<InitListExpr>(IList->getInit(Index)) || in CheckStructUnionTypes()
2564 CheckSubElementType(MemberEntity, IList, Field->getType(), Index, in CheckStructUnionTypes()
2567 CheckImplicitInitList(MemberEntity, IList, Field->getType(), Index, in CheckStructUnionTypes()
2683 InitListExpr *IList, in CheckDesignatedInitializer() argument
2727 IList->setInit(OldIndex, DIE->getInit()); in CheckDesignatedInitializer()
2729 CheckSubElementType(Entity, IList, CurrentObjectType, Index, StructuredList, in CheckDesignatedInitializer()
2734 if (IList->getInit(OldIndex) != DIE->getInit()) in CheckDesignatedInitializer()
2735 DIE->setInit(IList->getInit(OldIndex)); in CheckDesignatedInitializer()
2736 IList->setInit(OldIndex, DIE); in CheckDesignatedInitializer()
2756 IList, Index, CurrentObjectType, StructuredList, StructuredIndex, in CheckDesignatedInitializer()
2879 Loc = IList->getBeginLoc(); in CheckDesignatedInitializer()
3050 IList->setInit(Index, DIE->getInit()); in CheckDesignatedInitializer()
3054 CheckSubElementType(MemberEntity, IList, Field->getType(), Index, in CheckDesignatedInitializer()
3057 IList->setInit(OldIndex, DIE); in CheckDesignatedInitializer()
3073 if (CheckDesignatedInitializer(MemberEntity, IList, DIE, DesigIdx + 1, in CheckDesignatedInitializer()
3111 CheckStructUnionTypes(Entity, IList, CurrentObjectType, NoBases, Field, in CheckDesignatedInitializer()
3283 ElementEntity, IList, DIE, DesigIdx + 1, ElementType, nullptr, in CheckDesignatedInitializer()
3308 CheckArrayType(Entity, IList, CurrentObjectType, DesignatedStartIndex, in CheckDesignatedInitializer()
3317 InitListChecker::getStructuredSubobjectInit(InitListExpr *IList, unsigned Index, in getStructuredSubobjectInit() argument
3366 if (Index < IList->getNumInits()) { in getStructuredSubobjectInit()
3367 if (auto *Init = dyn_cast_or_null<InitListExpr>(IList->getInit(Index))) in getStructuredSubobjectInit()
3370 ExpectedNumInits = IList->getNumInits() - Index; in getStructuredSubobjectInit()