Lines Matching defs:InitializedEntity
242 void CheckImplicitInitList(const InitializedEntity &Entity,
246 void CheckExplicitInitList(const InitializedEntity &Entity,
250 void CheckListElementTypes(const InitializedEntity &Entity,
257 void CheckSubElementType(const InitializedEntity &Entity,
262 void CheckComplexType(const InitializedEntity &Entity,
267 void CheckScalarType(const InitializedEntity &Entity,
272 void CheckReferenceType(const InitializedEntity &Entity,
277 void CheckVectorType(const InitializedEntity &Entity,
281 void CheckStructUnionTypes(const InitializedEntity &Entity,
288 void CheckArrayType(const InitializedEntity &Entity,
294 bool CheckDesignatedInitializer(const InitializedEntity &Entity,
319 const InitializedEntity &Entity,
342 const InitializedEntity &ParentEntity,
345 void FillInEmptyInitializations(const InitializedEntity &Entity,
348 bool CheckFlexibleArrayInit(const InitializedEntity &Entity,
351 void CheckEmptyInitializable(const InitializedEntity &Entity,
355 InitListChecker(Sema &S, const InitializedEntity &Entity,
367 const InitializedEntity &Entity,
446 if (Entity.getKind() == InitializedEntity::EK_Member)
449 else if (Entity.getKind() == InitializedEntity::EK_ArrayElement)
458 if (Entity.getKind() == InitializedEntity::EK_Member)
462 else if (Entity.getKind() == InitializedEntity::EK_ArrayElement)
473 void InitListChecker::CheckEmptyInitializable(const InitializedEntity &Entity,
482 const InitializedEntity &ParentEntity,
488 InitializedEntity MemberEntity
489 = InitializedEntity::InitializeMember(Field, &ParentEntity);
570 InitListChecker::FillInEmptyInitializations(const InitializedEntity &Entity,
628 InitializedEntity ElementEntity = Entity;
635 ElementEntity = InitializedEntity::InitializeElement(SemaRef.Context,
640 ElementEntity = InitializedEntity::InitializeElement(SemaRef.Context,
649 if (ElementEntity.getKind() == InitializedEntity::EK_ArrayElement ||
650 ElementEntity.getKind() == InitializedEntity::EK_VectorElement)
678 if (ElementEntity.getKind() == InitializedEntity::EK_ArrayElement)
685 if (ElementEntity.getKind() == InitializedEntity::EK_ArrayElement) {
711 InitListChecker::InitListChecker(Sema &S, const InitializedEntity &Entity,
762 void InitListChecker::CheckImplicitInitList(const InitializedEntity &Entity,
832 static void warnBracedScalarInit(Sema &S, const InitializedEntity &Entity,
843 case InitializedEntity::EK_VectorElement:
844 case InitializedEntity::EK_ComplexElement:
845 case InitializedEntity::EK_ArrayElement:
846 case InitializedEntity::EK_Parameter:
847 case InitializedEntity::EK_Parameter_CF_Audited:
848 case InitializedEntity::EK_Result:
853 case InitializedEntity::EK_Member:
860 case InitializedEntity::EK_Variable:
861 case InitializedEntity::EK_LambdaCapture:
866 case InitializedEntity::EK_New:
867 case InitializedEntity::EK_Temporary:
868 case InitializedEntity::EK_CompoundLiteralInit:
872 case InitializedEntity::EK_RelatedResult:
876 case InitializedEntity::EK_Exception:
877 case InitializedEntity::EK_Base:
878 case InitializedEntity::EK_Delegating:
879 case InitializedEntity::EK_BlockElement:
897 void InitListChecker::CheckExplicitInitList(const InitializedEntity &Entity,
972 void InitListChecker::CheckListElementTypes(const InitializedEntity &Entity,
1029 void InitListChecker::CheckSubElementType(const InitializedEntity &Entity,
1187 void InitListChecker::CheckComplexType(const InitializedEntity &Entity,
1213 InitializedEntity ElementEntity =
1214 InitializedEntity::InitializeElement(SemaRef.Context, 0, Entity);
1224 void InitListChecker::CheckScalarType(const InitializedEntity &Entity,
1295 void InitListChecker::CheckReferenceType(const InitializedEntity &Entity,
1351 void InitListChecker::CheckVectorType(const InitializedEntity &Entity,
1365 InitializedEntity::InitializeElement(SemaRef.Context, 0, Entity),
1406 InitializedEntity ElementEntity =
1407 InitializedEntity::InitializeElement(SemaRef.Context, 0, Entity);
1464 InitializedEntity ElementEntity =
1465 InitializedEntity::InitializeElement(SemaRef.Context, 0, Entity);
1506 void InitListChecker::CheckArrayType(const InitializedEntity &Entity,
1598 InitializedEntity ElementEntity =
1599 InitializedEntity::InitializeElement(SemaRef.Context, StructuredIndex,
1630 CheckEmptyInitializable(InitializedEntity::InitializeElement(
1636 bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity,
1653 } else if (Entity.getKind() != InitializedEntity::EK_Variable) {
1675 void InitListChecker::CheckStructUnionTypes(const InitializedEntity &Entity,
1719 InitializedEntity::InitializeMember(*Field, &Entity),
1796 InitializedEntity MemberEntity =
1797 InitializedEntity::InitializeMember(*Field, &Entity);
1833 InitializedEntity::InitializeMember(*Field, &Entity),
1849 InitializedEntity MemberEntity =
1850 InitializedEntity::InitializeMember(*Field, &Entity);
1960 InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity,
2255 InitializedEntity MemberEntity =
2256 InitializedEntity::InitializeMember(*Field, &Entity);
2274 InitializedEntity MemberEntity =
2275 InitializedEntity::InitializeMember(*Field, &Entity);
2461 InitializedEntity ElementEntity =
2462 InitializedEntity::InitializeElement(SemaRef.Context, 0, Entity);
2769 InitializedEntity::InitializedEntity(ASTContext &Context, unsigned Index,
2770 const InitializedEntity &Parent)
2787 InitializedEntity
2788 InitializedEntity::InitializeBase(ASTContext &Context,
2791 InitializedEntity Result;
2802 DeclarationName InitializedEntity::getName() const {
2835 DeclaratorDecl *InitializedEntity::getDecl() const {
2864 bool InitializedEntity::allowsNRVO() const {
2891 unsigned InitializedEntity::dumpImpl(raw_ostream &OS) const {
2931 void InitializedEntity::dump() const {
3266 const InitializedEntity &Entity) {
3267 if (Entity.getKind() != InitializedEntity::EK_Variable)
3287 const InitializedEntity &Entity) {
3304 } else if (Entity.getKind() == InitializedEntity::EK_Result) {
3313 const InitializedEntity &Entity,
3341 InitializedEntity HiddenArray =
3342 InitializedEntity::InitializeTemporary(ArrayType);
3431 const InitializedEntity &Entity,
3574 const InitializedEntity &Entity,
3584 const InitializedEntity &Entity,
3591 const InitializedEntity &Entity,
3601 if (Entity.getKind() == InitializedEntity::EK_CompoundLiteralInit) {
3648 InitializedEntity TempEntity = InitializedEntity::InitializeTemporary(cv1T1);
3663 const InitializedEntity &Entity,
3809 const InitializedEntity &Entity,
3992 const InitializedEntity &Entity,
3997 const InitializedEntity &Entity,
4074 const InitializedEntity &Entity,
4255 InitializedEntity TempEntity = InitializedEntity::InitializeTemporary(cv1T1);
4312 const InitializedEntity &Entity,
4321 const InitializedEntity &Entity,
4399 const InitializedEntity &Entity,
4604 const InitializedEntity &Entity,
4607 Entity.getKind() == InitializedEntity::EK_Result &&
4721 const InitializedEntity &Entity,
4800 const InitializedEntity &Entity,
4820 const InitializedEntity &Entity,
4958 Entity.getKind() == InitializedEntity::EK_Member &&
5119 getAssignmentAction(const InitializedEntity &Entity, bool Diagnose = false) {
5121 case InitializedEntity::EK_Variable:
5122 case InitializedEntity::EK_New:
5123 case InitializedEntity::EK_Exception:
5124 case InitializedEntity::EK_Base:
5125 case InitializedEntity::EK_Delegating:
5128 case InitializedEntity::EK_Parameter:
5135 case InitializedEntity::EK_Parameter_CF_Audited:
5142 case InitializedEntity::EK_Result:
5145 case InitializedEntity::EK_Temporary:
5146 case InitializedEntity::EK_RelatedResult:
5150 case InitializedEntity::EK_Member:
5151 case InitializedEntity::EK_ArrayElement:
5152 case InitializedEntity::EK_VectorElement:
5153 case InitializedEntity::EK_ComplexElement:
5154 case InitializedEntity::EK_BlockElement:
5155 case InitializedEntity::EK_LambdaCapture:
5156 case InitializedEntity::EK_CompoundLiteralInit:
5165 static bool shouldBindAsTemporary(const InitializedEntity &Entity) {
5167 case InitializedEntity::EK_ArrayElement:
5168 case InitializedEntity::EK_Member:
5169 case InitializedEntity::EK_Result:
5170 case InitializedEntity::EK_New:
5171 case InitializedEntity::EK_Variable:
5172 case InitializedEntity::EK_Base:
5173 case InitializedEntity::EK_Delegating:
5174 case InitializedEntity::EK_VectorElement:
5175 case InitializedEntity::EK_ComplexElement:
5176 case InitializedEntity::EK_Exception:
5177 case InitializedEntity::EK_BlockElement:
5178 case InitializedEntity::EK_LambdaCapture:
5179 case InitializedEntity::EK_CompoundLiteralInit:
5182 case InitializedEntity::EK_Parameter:
5183 case InitializedEntity::EK_Parameter_CF_Audited:
5184 case InitializedEntity::EK_Temporary:
5185 case InitializedEntity::EK_RelatedResult:
5189 llvm_unreachable("missed an InitializedEntity kind?");
5194 static bool shouldDestroyTemporary(const InitializedEntity &Entity) {
5196 case InitializedEntity::EK_Result:
5197 case InitializedEntity::EK_New:
5198 case InitializedEntity::EK_Base:
5199 case InitializedEntity::EK_Delegating:
5200 case InitializedEntity::EK_VectorElement:
5201 case InitializedEntity::EK_ComplexElement:
5202 case InitializedEntity::EK_BlockElement:
5203 case InitializedEntity::EK_LambdaCapture:
5206 case InitializedEntity::EK_Member:
5207 case InitializedEntity::EK_Variable:
5208 case InitializedEntity::EK_Parameter:
5209 case InitializedEntity::EK_Parameter_CF_Audited:
5210 case InitializedEntity::EK_Temporary:
5211 case InitializedEntity::EK_ArrayElement:
5212 case InitializedEntity::EK_Exception:
5213 case InitializedEntity::EK_CompoundLiteralInit:
5214 case InitializedEntity::EK_RelatedResult:
5218 llvm_unreachable("missed an InitializedEntity kind?");
5271 static SourceLocation getInitializationLoc(const InitializedEntity &Entity,
5274 case InitializedEntity::EK_Result:
5277 case InitializedEntity::EK_Exception:
5280 case InitializedEntity::EK_Variable:
5283 case InitializedEntity::EK_LambdaCapture:
5286 case InitializedEntity::EK_ArrayElement:
5287 case InitializedEntity::EK_Member:
5288 case InitializedEntity::EK_Parameter:
5289 case InitializedEntity::EK_Parameter_CF_Audited:
5290 case InitializedEntity::EK_Temporary:
5291 case InitializedEntity::EK_New:
5292 case InitializedEntity::EK_Base:
5293 case InitializedEntity::EK_Delegating:
5294 case InitializedEntity::EK_VectorElement:
5295 case InitializedEntity::EK_ComplexElement:
5296 case InitializedEntity::EK_BlockElement:
5297 case InitializedEntity::EK_CompoundLiteralInit:
5298 case InitializedEntity::EK_RelatedResult:
5301 llvm_unreachable("missed an InitializedEntity kind?");
5326 const InitializedEntity &Entity,
5460 const InitializedEntity &Entity,
5510 const InitializedEntity &Entity) {
5521 else if (Entity.getKind() == InitializedEntity::EK_RelatedResult &&
5535 static bool isExplicitTemporary(const InitializedEntity &Entity,
5539 case InitializedEntity::EK_Temporary:
5540 case InitializedEntity::EK_CompoundLiteralInit:
5541 case InitializedEntity::EK_RelatedResult:
5561 const InitializedEntity &Entity,
5634 if (Entity.getKind() == InitializedEntity::EK_Base) {
5638 } else if (Entity.getKind() == InitializedEntity::EK_Delegating) {
5688 /// Determine whether the specified InitializedEntity definitely has a lifetime
5692 InitializedEntityOutlivesFullExpression(const InitializedEntity &Entity) {
5693 const InitializedEntity *Top = &Entity;
5698 case InitializedEntity::EK_Variable:
5699 case InitializedEntity::EK_Result:
5700 case InitializedEntity::EK_Exception:
5701 case InitializedEntity::EK_Member:
5702 case InitializedEntity::EK_New:
5703 case InitializedEntity::EK_Base:
5704 case InitializedEntity::EK_Delegating:
5707 case InitializedEntity::EK_ArrayElement:
5708 case InitializedEntity::EK_VectorElement:
5709 case InitializedEntity::EK_BlockElement:
5710 case InitializedEntity::EK_ComplexElement:
5715 case InitializedEntity::EK_Parameter:
5716 case InitializedEntity::EK_Parameter_CF_Audited:
5717 case InitializedEntity::EK_Temporary:
5718 case InitializedEntity::EK_LambdaCapture:
5719 case InitializedEntity::EK_CompoundLiteralInit:
5720 case InitializedEntity::EK_RelatedResult:
5731 static const InitializedEntity *getEntityForTemporaryLifetimeExtension(
5732 const InitializedEntity *Entity,
5733 const InitializedEntity *FallbackDecl = nullptr) {
5736 case InitializedEntity::EK_Variable:
5740 case InitializedEntity::EK_Member:
5751 case InitializedEntity::EK_Parameter:
5752 case InitializedEntity::EK_Parameter_CF_Audited:
5756 case InitializedEntity::EK_Result:
5760 case InitializedEntity::EK_New:
5766 case InitializedEntity::EK_Temporary:
5767 case InitializedEntity::EK_CompoundLiteralInit:
5768 case InitializedEntity::EK_RelatedResult:
5774 case InitializedEntity::EK_ArrayElement:
5779 case InitializedEntity::EK_Base:
5780 case InitializedEntity::EK_Delegating:
5787 case InitializedEntity::EK_BlockElement:
5788 case InitializedEntity::EK_LambdaCapture:
5789 case InitializedEntity::EK_Exception:
5790 case InitializedEntity::EK_VectorElement:
5791 case InitializedEntity::EK_ComplexElement:
5798 const InitializedEntity *ExtendingEntity);
5805 const InitializedEntity *ExtendingEntity) {
5851 const InitializedEntity *ExtendingEntity) {
5906 static void warnOnLifetimeExtension(Sema &S, const InitializedEntity &Entity,
5918 for (const InitializedEntity *Ent = Entity.getParent(); Ent;
5920 if (Ent->getKind() != InitializedEntity::EK_Base) {
6047 const InitializedEntity &Entity,
6290 if (const InitializedEntity *ExtendingEntity =
6314 if (const InitializedEntity *ExtendingEntity =
6499 InitializedEntity TempEntity = InitializedEntity::InitializeTemporary(Ty);
6500 InitializedEntity InitEntity = IsTemporary ? TempEntity : Entity;
6535 InitializedEntity TempEntity = InitializedEntity::InitializeTemporary(
6578 InitializedEntity TempEntity = InitializedEntity::InitializeTemporary(
6626 Entity.getKind() == InitializedEntity::EK_Parameter_CF_Audited);
6724 if (const InitializedEntity *ExtendingEntity =
6751 } else if (Entity.getKind() != InitializedEntity::EK_Variable) {
6770 if (Entity.getKind() == InitializedEntity::EK_Member &&
6779 Entity.getKind() == InitializedEntity::EK_Result);
6826 static void emitBadConversionNotes(Sema &S, const InitializedEntity &entity,
6838 if (entity.getKind() == InitializedEntity::EK_Result)
6843 static void diagnoseListInit(Sema &S, const InitializedEntity &Entity,
6854 InitializedEntity HiddenArray =
6855 InitializedEntity::InitializeTemporary(ArrayType);
6864 diagnoseListInit(S, InitializedEntity::InitializeTemporary(T), InitList);
6879 const InitializedEntity &Entity,
6977 << (Entity.getKind() == InitializedEntity::EK_Result)
7130 (Entity.getKind() == InitializedEntity::EK_Base ||
7131 Entity.getKind() == InitializedEntity::EK_Member) &&
7139 if (Entity.getKind() == InitializedEntity::EK_Base) {
7209 if (Entity.getKind() == InitializedEntity::EK_Member &&
7652 Sema::CanPerformCopyInitialization(const InitializedEntity &Entity,
7667 Sema::PerformCopyInitialization(const InitializedEntity &Entity,