aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/DeclObjC.h9
-rw-r--r--lib/AST/DeclObjC.cpp4
-rw-r--r--lib/Sema/SemaDeclObjC.cpp2
3 files changed, 6 insertions, 9 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index 8c8325fb67..5f216cf00a 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -782,12 +782,9 @@ public:
const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
void setClassInterface(ObjCInterfaceDecl *IDecl) { ClassInterface = IDecl; }
- void setReferencedProtocolList(ObjCProtocolDecl **List, unsigned NumRPs);
-
- void setCatReferencedProtocols(unsigned idx, ObjCProtocolDecl *OID) {
- assert((idx < NumReferencedProtocols) && "index out of range");
- ReferencedProtocols[idx] = OID;
- }
+ /// addReferencedProtocols - Set the list of protocols that this interface
+ /// implements.
+ void addReferencedProtocols(ObjCProtocolDecl **List, unsigned NumRPs);
ObjCProtocolDecl **getReferencedProtocols() const {
return ReferencedProtocols;
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index a1011b830e..5da762e1fb 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -452,8 +452,8 @@ void ObjCProtocolDecl::addMethods(ObjCMethodDecl **insMethods,
AtEndLoc = endLoc;
}
-void ObjCCategoryDecl::setReferencedProtocolList(ObjCProtocolDecl **List,
- unsigned NumRPs) {
+void ObjCCategoryDecl::addReferencedProtocols(ObjCProtocolDecl **List,
+ unsigned NumRPs) {
assert(NumReferencedProtocols == 0 && "Protocol list already set");
if (NumRPs == 0) return;
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 8cceda2966..ad40cbe845 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -435,7 +435,7 @@ Sema::DeclTy *Sema::ActOnStartCategoryInterface(
RefProtocols.push_back(RefPDecl);
}
if (!RefProtocols.empty())
- CDecl->setReferencedProtocolList(&RefProtocols[0], RefProtocols.size());
+ CDecl->addReferencedProtocols(&RefProtocols[0], RefProtocols.size());
}
CDecl->setLocEnd(EndProtoLoc);
return CDecl;