ObjcInterfaceDecl* IDecl = getObjCInterfaceDecl(ClassName);
if (IDecl) {
// Class already seen. Is it a forward declaration?
- if (!IDecl->getIsForwardDecl())
+ if (!IDecl->isForwardDecl())
Diag(AtInterfaceLoc, diag::err_duplicate_class_def, ClassName->getName());
else {
- IDecl->setIsForwardDecl(false);
+ IDecl->setForwardDecl(false);
IDecl->AllocIntfRefProtocols(NumProtocols);
}
}
// Check that super class is previously defined
SuperClassEntry = getObjCInterfaceDecl(SuperName);
- if (!SuperClassEntry || SuperClassEntry->getIsForwardDecl()) {
+ if (!SuperClassEntry || SuperClassEntry->isForwardDecl()) {
Diag(AtInterfaceLoc, diag::err_undef_superclass, SuperName->getName(),
ClassName->getName());
}
for (unsigned int i = 0; i != NumProtocols; i++) {
ObjcProtocolDecl* RefPDecl = getObjCProtocolDecl(S, ProtocolNames[i],
ClassLoc);
- if (!RefPDecl || RefPDecl->getIsForwardProtoDecl())
+ if (!RefPDecl || RefPDecl->isForwardDecl())
Diag(ClassLoc, diag::err_undef_protocolref,
ProtocolNames[i]->getName(),
ClassName->getName());
ObjcProtocolDecl *PDecl = getObjCProtocolDecl(S, ProtocolName, ProtocolLoc);
if (PDecl) {
// Protocol already seen. Better be a forward protocol declaration
- if (!PDecl->getIsForwardProtoDecl())
+ if (!PDecl->isForwardDecl())
Diag(ProtocolLoc, diag::err_duplicate_protocol_def,
ProtocolName->getName());
else {
- PDecl->setIsForwardProtoDecl(false);
+ PDecl->setForwardDecl(false);
PDecl->AllocReferencedProtocols(NumProtoRefs);
}
}
else {
PDecl = new ObjcProtocolDecl(AtProtoInterfaceLoc, NumProtoRefs,
ProtocolName);
- PDecl->setIsForwardProtoDecl(false);
+ PDecl->setForwardDecl(false);
// Chain & install the protocol decl into the identifier.
PDecl->setNext(ProtocolName->getFETokenInfo<ScopedDecl>());
ProtocolName->setFETokenInfo(PDecl);
for (unsigned int i = 0; i != NumProtoRefs; i++) {
ObjcProtocolDecl* RefPDecl = getObjCProtocolDecl(S, ProtoRefNames[i],
ProtocolLoc);
- if (!RefPDecl || RefPDecl->getIsForwardProtoDecl())
+ if (!RefPDecl || RefPDecl->isForwardDecl())
Diag(ProtocolLoc, diag::err_undef_protocolref,
ProtoRefNames[i]->getName(),
ProtocolName->getName());
CDecl->setClassInterface(IDecl);
/// Check that class of this category is already completely declared.
- if (!IDecl || IDecl->getIsForwardDecl())
+ if (!IDecl || IDecl->isForwardDecl())
Diag(ClassLoc, diag::err_undef_interface, ClassName->getName());
else {
/// Check for duplicate interface declaration for this category
for (unsigned int i = 0; i != NumProtoRefs; i++) {
ObjcProtocolDecl* RefPDecl = getObjCProtocolDecl(S, ProtoRefNames[i],
CategoryLoc);
- if (!RefPDecl || RefPDecl->getIsForwardProtoDecl())
+ if (!RefPDecl || RefPDecl->isForwardDecl())
Diag(CategoryLoc, diag::err_undef_protocolref,
ProtoRefNames[i]->getName(),
CategoryName->getName());
ClassName, IDecl,
CatName);
/// Check that class of this category is already completely declared.
- if (!IDecl || IDecl->getIsForwardDecl())
+ if (!IDecl || IDecl->isForwardDecl())
Diag(ClassLoc, diag::err_undef_interface, ClassName->getName());
/// TODO: Check that CatName, category name, is not used in another
// implementation.
/// List of categories defined for this class.
ObjcCategoryDecl *ListCategories;
- bool isForwardDecl; // declared with @class.
+ bool ForwardDecl; // declared with @class.
public:
ObjcInterfaceDecl(SourceLocation L, unsigned numRefProtos,
IdentifierInfo *Id, bool FD = false)
- : TypeDecl(ObjcInterface, L, Id, 0),
- SuperClass(0),
- IntfRefProtocols(0), NumIntfRefProtocols(-1),
- Ivars(0), NumIvars(-1),
+ : TypeDecl(ObjcInterface, L, Id, 0), SuperClass(0),
+ IntfRefProtocols(0), NumIntfRefProtocols(-1), Ivars(0), NumIvars(-1),
InsMethods(0), NumInsMethods(-1), ClsMethods(0), NumClsMethods(-1),
- ListCategories(0),
- isForwardDecl(FD) {
+ ListCategories(0), ForwardDecl(FD) {
AllocIntfRefProtocols(numRefProtos);
}
void ObjcAddMethods(ObjcMethodDecl **insMethods, unsigned numInsMembers,
ObjcMethodDecl **clsMethods, unsigned numClsMembers);
- bool getIsForwardDecl() const { return isForwardDecl; }
- void setIsForwardDecl(bool val) { isForwardDecl = val; }
+ bool isForwardDecl() const { return ForwardDecl; }
+ void setForwardDecl(bool val) { ForwardDecl = val; }
void setIntfRefProtocols(int idx, ObjcProtocolDecl *OID) {
assert((idx < NumIntfRefProtocols) && "index out of range");
ObjcMethodDecl** getClsMethods() const { return ProtoClsMethods; }
int getNumClsMethods() const { return NumProtoClsMethods; }
- bool getIsForwardProtoDecl() const { return isForwardProtoDecl; }
- void setIsForwardProtoDecl(bool val) { isForwardProtoDecl = val; }
+ bool isForwardDecl() const { return isForwardProtoDecl; }
+ void setForwardDecl(bool val) { isForwardProtoDecl = val; }
static bool classof(const Decl *D) {
return D->getKind() == ObjcProtocol;