Home | History | Annotate | Download | only in AST

Lines Matching defs:Designator

186   /// array in its designator.
211 assert(I == 0 && "unexpected unsized array designator");
284 assert(V.isLValue() && "Non-LValue used to make an LValue designator?");
379 /// relevant diagnostic and set the designator as invalid.
384 assert(!Invalid && "invalid designator has no subobject type");
390 /// Update this designator to refer to the first element within this array.
400 /// Update this designator to refer to the first element within the array of
413 /// Update this designator to refer to the given base or member of this
426 /// Update this designator to refer to the given complex component.
1418 // Do not set the designator as invalid: we can represent this situation,
1552 SubobjectDesignator Designator;
1559 SubobjectDesignator &getLValueDesignator() { return Designator; }
1560 const SubobjectDesignator &getLValueDesignator() const { return Designator;}
1567 if (Designator.Invalid)
1571 V = APValue(Base, Offset, Designator.Entries,
1572 Designator.IsOnePastTheEnd, IsNullPtr);
1580 Designator = SubobjectDesignator(Ctx, V);
1597 Designator = SubobjectDesignator(getType(B));
1606 Designator = SubobjectDesignator(PointerTy->getPointeeType());
1622 // a diagnostic and mark the designator as invalid.
1625 if (Designator.Invalid)
1629 Designator.setInvalid();
1650 // Check this LValue refers to an object. If not, set the designator to be
1654 Designator.checkSubobject(Info, E, CSK);
1660 Designator.addDeclUnchecked(D, Virtual);
1663 if (!Designator.Entries.empty()) {
1665 Designator.setInvalid();
1670 Designator.FirstEntryIsAnUnsizedArray = true;
1671 Designator.addUnsizedArrayUnchecked(ElemTy);
1676 Designator.addArrayUnchecked(CAT);
1680 Designator.addComplexUnchecked(EltTy, Imag);
1701 Designator.adjustIndex(Info, E, Index);
1922 This->Designator.MostDerivedType);
2128 const SubobjectDesignator &Designator = LVal.getLValueDesignator();
2153 << IsReferenceType << !Designator.Entries.empty() << InvalidBaseKind
2175 << IsReferenceType << !Designator.Entries.empty()
2203 << IsReferenceType << !Designator.Entries.empty();
2270 if (!Designator.Invalid && Designator.isOnePastTheEnd()) {
2272 << !Designator.Entries.empty() << !!BaseVD << BaseVD;
3026 SubobjectDesignator &D = Result.Designator;
3074 SubobjectDesignator &D = Obj.Designator;
3615 // Walk the designator's path to find the subobject.
3702 // designator which points more than one past the end of the array.
4212 if (LVal.Designator.Invalid)
4234 return extractSubobject(Info, Conv, LitObj, LVal.Designator, RVal, AK);
4238 assert(LVal.Designator.Entries.size() <= 1 &&
4240 if (LVal.Designator.Entries.empty()) {
4247 if (LVal.Designator.isOnePastTheEnd()) {
4254 uint64_t CharIndex = LVal.Designator.Entries[0].getAsArrayIndex();
4261 return Obj && extractSubobject(Info, Conv, Obj, LVal.Designator, RVal, AK);
4267 if (LVal.Designator.Invalid)
4276 return Obj && modifySubobject(Info, E, Obj, LVal.Designator, Val);
4410 if (LVal.Designator.Invalid)
4421 return Obj && findSubobject(Info, E, Obj, LVal.Designator, Handler);
4554 if (LVal.Designator.Invalid)
4565 return Obj && findSubobject(Info, E, Obj, LVal.Designator, Handler);
4591 /// the resulting LValue subobject designator. This is not possible when
4616 if (LV.Designator.MostDerivedPathLength + MemPtr.Path.size() >
4617 LV.Designator.Entries.size()) {
4622 LV.Designator.Entries.size() - MemPtr.Path.size();
4625 LV.Designator.Entries[PathLengthToMember + I]);
4639 LV.Designator.Entries.reserve(LV.Designator.Entries.size() +
4699 SubobjectDesignator &D = Result.Designator;
5516 if (This.Designator.Invalid)
5528 if (This.Designator.isOnePastTheEnd() ||
5529 This.Designator.isMostDerivedAnUnsizedArray()) {
5530 Info.FFDiag(E, This.Designator.isOnePastTheEnd()
5541 Info.Ctx.getLValueReferenceType(This.Designator.getType(Info.Ctx));
5550 return Obj && findSubobject(Info, E, Obj, This.Designator, Handler);
5571 static const CXXRecordDecl *getBaseClassType(SubobjectDesignator &Designator,
5573 assert(PathLength >= Designator.MostDerivedPathLength && PathLength <=
5574 Designator.Entries.size() && "invalid path length");
5575 return (PathLength == Designator.MostDerivedPathLength)
5576 ? Designator.MostDerivedType->getAsCXXRecordDecl()
5577 : getAsBaseClass(Designator.Entries[PathLength - 1]);
5596 This.Designator.MostDerivedType->getAsCXXRecordDecl();
5606 ArrayRef<APValue::LValuePathEntry> Path = This.Designator.Entries;
5607 for (unsigned PathLength = This.Designator.MostDerivedPathLength;
5623 return DynamicType{getBaseClassType(This.Designator, PathLength),
5651 for (/**/; PathLength <= This.Designator.Entries.size(); ++PathLength) {
5652 const CXXRecordDecl *Class = getBaseClassType(This.Designator, PathLength);
5676 CovariantPathLength != This.Designator.Entries.size();
5679 getBaseClassType(This.Designator, CovariantPathLength);
5745 SubobjectDesignator &D = Ptr.Designator;
5795 << DiagKind << Ptr.Designator.getType(Info.Ctx)
5804 for (int PathLength = Ptr.Designator.Entries.size();
5806 const CXXRecordDecl *Class = getBaseClassType(Ptr.Designator, PathLength);
5811 !isBaseClassPublic(getBaseClassType(Ptr.Designator, PathLength - 1),
5892 if (LHS.InvalidBase || LHS.Designator.Invalid)
5898 unsigned PathLength = LHS.Designator.Entries.size();
5922 LHS.Designator.Entries[PathLength]
5949 LHS.Designator.Entries[PathLength]
5971 // Form a designator for the union object.
5972 SubobjectDesignator D = LHS.Designator;
6144 ObjectUnderConstruction{This.getLValueBase(), This.Designator.Entries},
6453 ObjectUnderConstruction{This.getLValueBase(), This.Designator.Entries});
6550 return Obj && findSubobject(Info, E, Obj, This.Designator, Handler);
6682 Subobject = Pointer.Designator.MostDerivedPathLength != 0 ||
6683 Pointer.Designator.isOnePastTheEnd();
6685 Subobject = Pointer.Designator.Entries.size() != 1 ||
6686 Pointer.Designator.Entries[0].getAsArrayIndex() != 0;
6690 << PointerAsString() << Pointer.Designator.isOnePastTheEnd();
6715 if (Pointer.Designator.Invalid)
7751 SubobjectDesignator Designator(BaseTy);
7752 Designator.addDeclUnchecked(FD);
7755 return extractSubobject(Info, E, Obj, Designator, Result) &&
8093 Result.Designator.setInvalid();
8729 if (!Result.InvalidBase && !Result.Designator.Invalid &&
8731 Info.Ctx.hasSameUnqualifiedType(Result.Designator.getType(Info.Ctx),
8738 Result.Designator.setInvalid();
8792 Result.Designator.setInvalid();
8989 Result.Designator.setInvalid();
9001 Result.Designator.setInvalid();
9091 Result.Designator.Invalid)
9093 QualType CharTy = Result.Designator.getType(Info.Ctx);
9218 if (Src.Designator.Invalid || Dest.Designator.Invalid)
9222 // trivially-copyable type. (For the wide version, the designator will be
9224 QualType T = Dest.Designator.getType(Info.Ctx);
9225 QualType SrcT = Src.Designator.getType(Info.Ctx);
9257 uint64_t RemainingSrcSize = Src.Designator.validIndexAdjustments().second;
9258 uint64_t RemainingDestSize = Dest.Designator.validIndexAdjustments().second;
9342 if (Result.Designator.Invalid)
9490 if (!Obj || !findSubobject(Info, E, Obj, Result.Designator, Handler))
9784 ObjectUnderConstruction{This.getLValueBase(), This.Designator.Entries},
11186 /// Checks to see if the given LValue's Designator is at the end of the LValue's
11202 assert(!LVal.Designator.Invalid);
11230 if (LVal.Designator.FirstEntryIsAnUnsizedArray) {
11240 for (unsigned E = LVal.Designator.Entries.size(); I != E; ++I) {
11241 const auto &Entry = LVal.Designator.Entries[I];
11244 // the index iff this is the last array in the Designator.
11271 /// Tests to see if the LValue has a user-specified designator (that isn't
11273 /// an unsized array as its first designator entry, because there's currently no
11276 if (LVal.Designator.Invalid)
11279 if (!LVal.Designator.Entries.empty())
11280 return LVal.Designator.isMostDerivedAnUnsizedArray();
11285 // If `E` is a MemberExpr, then the first part of the designator is hiding in
11294 const SubobjectDesignator &Designator = LVal.Designator;
11307 Designator.Entries.size() == Designator.MostDerivedPathLength &&
11308 Designator.MostDerivedIsArrayElement &&
11341 // for when Type=1 and the designator is invalid, because we're asked for an
11343 if (!(Type & 1) || LVal.Designator.Invalid || DetermineForCompleteObject) {
11361 const SubobjectDesignator &Designator = LVal.Designator;
11386 if (!CheckedHandleSizeof(Designator.MostDerivedType, BytesPerElem))
11393 if (Designator.MostDerivedIsArrayElement &&
11394 Designator.Entries.size() == Designator.MostDerivedPathLength) {
11395 uint64_t ArraySize = Designator.getMostDerivedArraySize();
11396 uint64_t ArrayIndex = Designator.Entries.back().getAsArrayIndex();
11399 ElemsRemaining = Designator.isOnePastTheEnd() ? 0 : 1;
11902 String1.Designator.Invalid || String2.Designator.Invalid)
11905 QualType CharTy1 = String1.Designator.getType(Info.Ctx);
11906 QualType CharTy2 = String2.Designator.getType(Info.Ctx);
12145 // If the designator is valid and refers to a subobject, we're not pointing
12326 assert(!LVal.hasLValuePath() && "have designator for integer lvalue");
13278 LV.Designator.setInvalid();
14423 if (Pointer.Designator.Invalid)
14442 // For the non-array case, the designator must be empty if the static type
14444 if (!E->isArrayForm() && Pointer.Designator.Entries.size() != 0 &&