Lines Matching refs:IList
305 InitListExpr *IList, QualType &T,
309 InitListExpr *IList, QualType &DeclType,
316 InitListExpr *IList, QualType ElemType,
322 InitListExpr *IList, QualType DeclType,
327 InitListExpr *IList, QualType DeclType,
332 InitListExpr *IList, QualType DeclType,
337 InitListExpr *IList, QualType DeclType, unsigned &Index,
341 InitListExpr *IList, QualType DeclType,
349 InitListExpr *IList, QualType &DeclType,
355 InitListExpr *IList, DesignatedInitExpr *DIE,
365 InitListExpr *getStructuredSubobjectInit(InitListExpr *IList, unsigned Index,
1193 InitListExpr *IList, QualType &T, in CheckExplicitInitList() argument
1197 CheckListElementTypes(Entity, IList, T, /*SubobjectIsDesignatorContext=*/true, in CheckExplicitInitList()
1204 IList->setType(ExprTy); in CheckExplicitInitList()
1211 if (Index < IList->getNumInits() && !T->isIncompleteType()) { in CheckExplicitInitList()
1225 SemaRef.Diag(IList->getInit(Index)->getBeginLoc(), DK) in CheckExplicitInitList()
1226 << IList->getInit(Index)->getSourceRange(); in CheckExplicitInitList()
1231 SemaRef.Diag(IList->getInit(Index)->getBeginLoc(), DK) in CheckExplicitInitList()
1232 << T << IList->getInit(Index)->getSourceRange(); in CheckExplicitInitList()
1242 SemaRef.Diag(IList->getInit(Index)->getBeginLoc(), DK) in CheckExplicitInitList()
1243 << initKind << IList->getInit(Index)->getSourceRange(); in CheckExplicitInitList()
1248 if (T->isScalarType() && IList->getNumInits() == 1 && in CheckExplicitInitList()
1249 !isa<InitListExpr>(IList->getInit(0))) in CheckExplicitInitList()
1250 warnBracedScalarInit(SemaRef, Entity, IList->getSourceRange()); in CheckExplicitInitList()
1259 if (IList->getNumInits() == 0) { in CheckExplicitInitList()
1265 SemaRef.Diag(IList->getBeginLoc(), in CheckExplicitInitList()
1267 << IList->getSourceRange() << T; in CheckExplicitInitList()
1274 InitListExpr *IList, in CheckListElementTypes() argument
1284 CheckComplexType(Entity, IList, DeclType, Index, in CheckListElementTypes()
1287 CheckScalarType(Entity, IList, DeclType, Index, in CheckListElementTypes()
1290 CheckVectorType(Entity, IList, DeclType, Index, in CheckListElementTypes()
1301 CheckStructUnionTypes(Entity, IList, DeclType, Bases, RD->field_begin(), in CheckListElementTypes()
1308 CheckArrayType(Entity, IList, DeclType, Zero, in CheckListElementTypes()
1315 SemaRef.Diag(IList->getBeginLoc(), diag::err_illegal_initializer_type) in CheckListElementTypes()
1319 CheckReferenceType(Entity, IList, DeclType, Index, in CheckListElementTypes()
1323 SemaRef.Diag(IList->getBeginLoc(), diag::err_init_objc_class) << DeclType; in CheckListElementTypes()
1328 CheckScalarType(Entity, IList, DeclType, Index, StructuredList, in CheckListElementTypes()
1332 SemaRef.Diag(IList->getBeginLoc(), diag::err_illegal_initializer_type) in CheckListElementTypes()
1339 InitListExpr *IList, in CheckSubElementType() argument
1345 Expr *expr = IList->getInit(Index); in CheckSubElementType()
1348 return CheckReferenceType(Entity, IList, ElemType, Index, in CheckSubElementType()
1417 return CheckScalarType(Entity, IList, ElemType, Index, in CheckSubElementType()
1477 CheckImplicitInitList(Entity, IList, ElemType, Index, StructuredList, in CheckSubElementType()
1513 InitListExpr *IList, QualType DeclType, in CheckComplexType() argument
1526 if (IList->getNumInits() != 2) in CheckComplexType()
1527 return CheckScalarType(Entity, IList, DeclType, Index, StructuredList, in CheckComplexType()
1533 SemaRef.Diag(IList->getBeginLoc(), diag::ext_complex_component_init) in CheckComplexType()
1534 << IList->getSourceRange(); in CheckComplexType()
1543 CheckSubElementType(ElementEntity, IList, elementType, Index, in CheckComplexType()
1549 InitListExpr *IList, QualType DeclType, in CheckScalarType() argument
1553 if (Index >= IList->getNumInits()) { in CheckScalarType()
1556 SemaRef.Diag(IList->getBeginLoc(), in CheckScalarType()
1560 << DeclType << IList->getSourceRange(); in CheckScalarType()
1562 SemaRef.Diag(IList->getBeginLoc(), in CheckScalarType()
1566 << IList->getSourceRange(); in CheckScalarType()
1574 Expr *expr = IList->getInit(Index); in CheckScalarType()
1619 IList->setInit(Index, ResultExpr); in CheckScalarType()
1627 InitListExpr *IList, QualType DeclType, in CheckReferenceType() argument
1631 if (Index >= IList->getNumInits()) { in CheckReferenceType()
1637 SemaRef.Diag(IList->getBeginLoc(), in CheckReferenceType()
1639 << DeclType << IList->getSourceRange(); in CheckReferenceType()
1646 Expr *expr = IList->getInit(Index); in CheckReferenceType()
1649 SemaRef.Diag(IList->getBeginLoc(), diag::err_init_non_aggr_init_list) in CheckReferenceType()
1650 << DeclType << IList->getSourceRange(); in CheckReferenceType()
1675 IList->setInit(Index, expr); in CheckReferenceType()
1682 InitListExpr *IList, QualType DeclType, in CheckVectorType() argument
1691 if (Index >= IList->getNumInits()) { in CheckVectorType()
1695 IList->getEndLoc()); in CheckVectorType()
1702 Expr *Init = IList->getInit(Index); in CheckVectorType()
1725 IList->setInit(Index, ResultExpr); in CheckVectorType()
1738 if (Index >= IList->getNumInits()) { in CheckVectorType()
1739 CheckEmptyInitializable(ElementEntity, IList->getEndLoc()); in CheckVectorType()
1744 CheckSubElementType(ElementEntity, IList, elementType, Index, in CheckVectorType()
1765 SemaRef.Diag(IList->getBeginLoc(), in CheckVectorType()
1780 SemaRef.Diag(IList->getBeginLoc(), in CheckVectorType()
1796 if (Index >= IList->getNumInits()) in CheckVectorType()
1801 QualType IType = IList->getInit(Index)->getType(); in CheckVectorType()
1803 CheckSubElementType(ElementEntity, IList, elementType, Index, in CheckVectorType()
1816 CheckSubElementType(ElementEntity, IList, VecType, Index, in CheckVectorType()
1825 SemaRef.Diag(IList->getBeginLoc(), in CheckVectorType()
1857 InitListExpr *IList, QualType &DeclType, in CheckArrayType() argument
1867 IList->getEndLoc(), SemaRef)) { in CheckArrayType()
1874 if (Index < IList->getNumInits()) { in CheckArrayType()
1875 if (IsStringInit(IList->getInit(Index), arrayType, SemaRef.Context) == in CheckArrayType()
1884 CheckStringInit(IList->getInit(Index), DeclType, arrayType, SemaRef); in CheckArrayType()
1887 IList->getInit(Index)); in CheckArrayType()
1920 while (Index < IList->getNumInits()) { in CheckArrayType()
1921 Expr *Init = IList->getInit(Index); in CheckArrayType()
1931 if (CheckDesignatedInitializer(Entity, IList, DIE, 0, in CheckArrayType()
1962 CheckSubElementType(ElementEntity, IList, elementType, Index, in CheckArrayType()
1978 SemaRef.Diag(IList->getBeginLoc(), diag::ext_typecheck_zero_array_size); in CheckArrayType()
1993 IList->getEndLoc()); in CheckArrayType()
2032 const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, in CheckStructUnionTypes() argument
2048 if (DeclType->isUnionType() && IList->getNumInits() == 0) { in CheckStructUnionTypes()
2054 if (checkDestructorReference(ET, IList->getEndLoc(), SemaRef)) { in CheckStructUnionTypes()
2082 IList->getEndLoc()); in CheckStructUnionTypes()
2095 Expr *Init = Index < IList->getNumInits() ? IList->getInit(Index) : nullptr; in CheckStructUnionTypes()
2102 SourceLocation InitLoc = Init ? Init->getBeginLoc() : IList->getEndLoc(); in CheckStructUnionTypes()
2106 CheckSubElementType(BaseEntity, IList, Base.getType(), Index, in CheckStructUnionTypes()
2130 !IList->isIdiomaticZeroInitializer(SemaRef.getLangOpts()); in CheckStructUnionTypes()
2133 while (Index < IList->getNumInits()) { in CheckStructUnionTypes()
2134 Expr *Init = IList->getInit(Index); in CheckStructUnionTypes()
2148 if (CheckDesignatedInitializer(Entity, IList, DIE, 0, in CheckStructUnionTypes()
2185 if (IList->getNumInits() == 1) { in CheckStructUnionTypes()
2227 *Field, IList->getInit(Index)->getBeginLoc()); in CheckStructUnionTypes()
2245 CheckSubElementType(MemberEntity, IList, Field->getType(), Index, in CheckStructUnionTypes()
2266 SemaRef.Diag(IList->getSourceRange().getEnd(), in CheckStructUnionTypes()
2281 IList->getEndLoc()); in CheckStructUnionTypes()
2293 if (checkDestructorReference(ET, IList->getEndLoc(), SemaRef)) { in CheckStructUnionTypes()
2301 Index >= IList->getNumInits()) in CheckStructUnionTypes()
2304 if (CheckFlexibleArrayInit(Entity, IList->getInit(Index), *Field, in CheckStructUnionTypes()
2314 if (isa<InitListExpr>(IList->getInit(Index))) in CheckStructUnionTypes()
2315 CheckSubElementType(MemberEntity, IList, Field->getType(), Index, in CheckStructUnionTypes()
2318 CheckImplicitInitList(MemberEntity, IList, Field->getType(), Index, in CheckStructUnionTypes()
2429 InitListExpr *IList, in CheckDesignatedInitializer() argument
2471 IList->setInit(OldIndex, DIE->getInit()); in CheckDesignatedInitializer()
2473 CheckSubElementType(Entity, IList, CurrentObjectType, Index, StructuredList, in CheckDesignatedInitializer()
2478 if (IList->getInit(OldIndex) != DIE->getInit()) in CheckDesignatedInitializer()
2479 DIE->setInit(IList->getInit(OldIndex)); in CheckDesignatedInitializer()
2480 IList->setInit(OldIndex, DIE); in CheckDesignatedInitializer()
2500 IList, Index, CurrentObjectType, StructuredList, StructuredIndex, in CheckDesignatedInitializer()
2781 IList->setInit(Index, DIE->getInit()); in CheckDesignatedInitializer()
2785 CheckSubElementType(MemberEntity, IList, Field->getType(), Index, in CheckDesignatedInitializer()
2788 IList->setInit(OldIndex, DIE); in CheckDesignatedInitializer()
2804 if (CheckDesignatedInitializer(MemberEntity, IList, DIE, DesigIdx + 1, in CheckDesignatedInitializer()
2838 CheckStructUnionTypes(Entity, IList, CurrentObjectType, NoBases, Field, in CheckDesignatedInitializer()
3010 ElementEntity, IList, DIE, DesigIdx + 1, ElementType, nullptr, in CheckDesignatedInitializer()
3035 CheckArrayType(Entity, IList, CurrentObjectType, DesignatedStartIndex, in CheckDesignatedInitializer()
3044 InitListChecker::getStructuredSubobjectInit(InitListExpr *IList, unsigned Index, in getStructuredSubobjectInit() argument
3093 if (Index < IList->getNumInits()) { in getStructuredSubobjectInit()
3094 if (auto *Init = dyn_cast_or_null<InitListExpr>(IList->getInit(Index))) in getStructuredSubobjectInit()
3097 ExpectedNumInits = IList->getNumInits() - Index; in getStructuredSubobjectInit()