typedef NamedDecl * const *chain_iterator;
typedef llvm::iterator_range<chain_iterator> chain_range;
- chain_range chains() const {
+ chain_range chain() const {
return chain_range(Chaining, Chaining + ChainingSize);
}
- chain_iterator chain_begin() const { return chains().begin(); }
- chain_iterator chain_end() const { return chains().end(); }
+ chain_iterator chain_begin() const { return chain().begin(); }
+ chain_iterator chain_end() const { return chain().end(); }
unsigned getChainingSize() const { return ChainingSize; }
inline SVal ProgramState::getLValue(const IndirectFieldDecl *D,
SVal Base) const {
StoreManager &SM = *getStateManager().StoreMgr;
- for (const auto *I : D->chains()) {
+ for (const auto *I : D->chain()) {
Base = SM.getLValueField(cast<FieldDecl>(I), Base);
}
new (Importer.getToContext())NamedDecl*[D->getChainingSize()];
unsigned i = 0;
- for (auto *PI : D->chains()) {
+ for (auto *PI : D->chain()) {
Decl *D = Importer.Import(PI);
if (!D)
return 0;
static bool HandleLValueIndirectMember(EvalInfo &Info, const Expr *E,
LValue &LVal,
const IndirectFieldDecl *IFD) {
- for (const auto *C : IFD->chains())
+ for (const auto *C : IFD->chain())
if (!HandleLValueMember(Info, E, LVal, cast<FieldDecl>(C)))
return false;
return true;
} else if (IndirectFieldDecl *IFD = (*I)->getIndirectMember()) {
// Walk the indirect field decl's chain to find the object to initialize,
// and make sure we've initialized every step along it.
- for (auto *C : IFD->chains()) {
+ for (auto *C : IFD->chain()) {
FD = cast<FieldDecl>(C);
CXXRecordDecl *CD = cast<CXXRecordDecl>(FD->getParent());
// Switch the union field if it differs. This happens if we had
const IndirectFieldDecl *IFD = cast<IndirectFieldDecl>(VD);
OffsetInBits = 0;
- for (const auto *CI : IFD->chains())
+ for (const auto *CI : IFD->chain())
OffsetInBits += ::getFieldOffset(*this, cast<FieldDecl>(CI));
}
// If we are initializing an anonymous union field, drill down to
// the field.
IndirectFieldDecl *IndirectField = MemberInit->getIndirectMember();
- for (const auto *I : IndirectField->chains())
+ for (const auto *I : IndirectField->chain())
LHS = CGF.EmitLValueForFieldInitialization(LHS, cast<FieldDecl>(I));
FieldType = MemberInit->getIndirectMember()->getAnonField()->getType();
} else {
// anonymous union is declared.
unsigned OldChainingSize = Chaining.size();
if (IndirectFieldDecl *IF = dyn_cast<IndirectFieldDecl>(VD))
- for (auto *PI : IF->chains())
+ for (auto *PI : IF->chain())
Chaining.push_back(PI);
else
Chaining.push_back(VD);
if (!Indirect)
return isInactiveUnionMember(Field);
- for (auto *C : Indirect->chains()) {
+ for (auto *C : Indirect->chain()) {
FieldDecl *Field = dyn_cast<FieldDecl>(C);
if (Field && isInactiveUnionMember(Field))
return true;
Info.AllBaseFields[Member->getAnyMember()] = Member;
if (IndirectFieldDecl *F = Member->getIndirectMember()) {
- for (auto *C : F->chains()) {
+ for (auto *C : F->chain()) {
FieldDecl *FD = dyn_cast<FieldDecl>(C);
if (FD && FD->getParent()->isUnion())
Info.ActiveUnionMember.insert(std::make_pair(
}
if (IndirectMemberDecl) {
- for (auto *FI : IndirectMemberDecl->chains()) {
+ for (auto *FI : IndirectMemberDecl->chain()) {
assert(isa<FieldDecl>(FI));
Comps.push_back(OffsetOfNode(OC.LocStart,
cast<FieldDecl>(FI), OC.LocEnd));
new (SemaRef.Context)NamedDecl*[D->getChainingSize()];
int i = 0;
- for (auto *PI : D->chains()) {
+ for (auto *PI : D->chain()) {
NamedDecl *Next = SemaRef.FindInstantiatedDecl(D->getLocation(), PI,
TemplateArgs);
if (!Next)
VisitValueDecl(D);
Record.push_back(D->getChainingSize());
- for (const auto *P : D->chains())
+ for (const auto *P : D->chain())
Writer.AddDeclRef(P, Record);
Code = serialization::DECL_INDIRECTFIELD;
}