: NamedDecl(DK, L, Id), NextDeclarator(PrevDecl), Next(0), CtxDecl(CD) {}
public:
- ContextDecl *getContext() const { return CtxDecl; }
+ ContextDecl *getContextDecl() const { return CtxDecl; }
ScopedDecl *getNext() const { return Next; }
void setNext(ScopedDecl *N) { Next = N; }
// roughly global variables and functions, but also handles enums (which could
// be defined inside or outside a function etc).
bool isDefinedOutsideFunctionOrMethod() const {
- if (getContext())
- return !getContext()->isFunctionOrMethod();
+ if (getContextDecl())
+ return !getContextDecl()->isFunctionOrMethod();
else
return true;
}
ContextDecl *ContextDecl::getParent() const {
if (ScopedDecl *SD = dyn_cast<ScopedDecl>(this))
- return SD->getContext();
+ return SD->getContextDecl();
else
return NULL;
}
void ScopedDecl::EmitInRec(Serializer& S) const {
NamedDecl::EmitInRec(S);
S.EmitPtr(getNext()); // From ScopedDecl.
- S.EmitPtr(cast_or_null<Decl>(getContext())); // From ScopedDecl.
+ S.EmitPtr(cast_or_null<Decl>(getContextDecl())); // From ScopedDecl.
}
void ScopedDecl::ReadInRec(Deserializer& D) {