[cfe-commits] r167091 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/AST/DeclObjC.cpp lib/Sema/SemaObjCProperty.cpp
Anna Zaks
ganna at apple.com
Tue Oct 30 18:18:22 PDT 2012
Author: zaks
Date: Tue Oct 30 20:18:22 2012
New Revision: 167091
URL: http://llvm.org/viewvc/llvm-project?rev=167091&view=rev
Log:
Address Jordan's review: comments, spaces.
Modified:
cfe/trunk/include/clang/AST/DeclObjC.h
cfe/trunk/lib/AST/DeclObjC.cpp
cfe/trunk/lib/Sema/SemaObjCProperty.cpp
Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=167091&r1=167090&r2=167091&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Tue Oct 30 20:18:22 2012
@@ -541,11 +541,12 @@
ObjCPropertyDecl *FindPropertyDeclaration(IdentifierInfo *PropertyId) const;
- typedef llvm::DenseMap<IdentifierInfo *, ObjCPropertyDecl*> PropertyMap;
+ typedef llvm::DenseMap<IdentifierInfo*, ObjCPropertyDecl*> PropertyMap;
/// This routine collects list of properties to be implemented in the class.
/// This includes, class's and its conforming protocols' properties.
- virtual void collectPropertiesToImplement(PropertyMap& PM) const {}
+ /// Note, the superclass's properties are not included in the list.
+ virtual void collectPropertiesToImplement(PropertyMap &PM) const {}
SourceLocation getAtStartLoc() const { return AtStart; }
void setAtStartLoc(SourceLocation Loc) { AtStart = Loc; }
@@ -906,7 +907,7 @@
ObjCPropertyDecl
*FindPropertyVisibleInPrimaryClass(IdentifierInfo *PropertyId) const;
- virtual void collectPropertiesToImplement(PropertyMap& PM) const;
+ virtual void collectPropertiesToImplement(PropertyMap &PM) const;
/// isSuperClassOf - Return true if this class is the specified class or is a
/// super class of the specified interface class.
@@ -1302,7 +1303,7 @@
return getFirstDeclaration();
}
- virtual void collectPropertiesToImplement(PropertyMap& PM) const;
+ virtual void collectPropertiesToImplement(PropertyMap &PM) const;
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classofKind(Kind K) { return K == ObjCProtocol; }
Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=167091&r1=167090&r2=167091&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Tue Oct 30 20:18:22 2012
@@ -190,7 +190,7 @@
return 0;
}
-void ObjCInterfaceDecl::collectPropertiesToImplement(PropertyMap& PM) const {
+void ObjCInterfaceDecl::collectPropertiesToImplement(PropertyMap &PM) const {
for (ObjCContainerDecl::prop_iterator P = prop_begin(),
E = prop_end(); P != E; ++P) {
ObjCPropertyDecl *Prop = *P;
@@ -200,6 +200,9 @@
PI = all_referenced_protocol_begin(),
E = all_referenced_protocol_end(); PI != E; ++PI)
(*PI)->collectPropertiesToImplement(PM);
+ // Note, the properties declared only in class extensions are still copied
+ // into the main @interface's property list, and therefore we don't
+ // explicitly, have to search class extension properties.
}
void ObjCInterfaceDecl::mergeClassExtensionProtocolList(
@@ -1325,7 +1328,7 @@
RD->Data = this->Data;
}
-void ObjCProtocolDecl::collectPropertiesToImplement(PropertyMap& PM) const {
+void ObjCProtocolDecl::collectPropertiesToImplement(PropertyMap &PM) const {
for (ObjCProtocolDecl::prop_iterator P = prop_begin(),
E = prop_end(); P != E; ++P) {
ObjCPropertyDecl *Prop = *P;
Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=167091&r1=167090&r2=167091&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Tue Oct 30 20:18:22 2012
@@ -1440,8 +1440,8 @@
/// CollectImmediateProperties - This routine collects all properties in
/// the class and its conforming protocols; but not those it its super class.
void Sema::CollectImmediateProperties(ObjCContainerDecl *CDecl,
- ObjCContainerDecl::PropertyMap& PropMap,
- ObjCContainerDecl::PropertyMap& SuperPropMap) {
+ ObjCContainerDecl::PropertyMap &PropMap,
+ ObjCContainerDecl::PropertyMap &SuperPropMap) {
if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(CDecl)) {
for (ObjCContainerDecl::prop_iterator P = IDecl->prop_begin(),
E = IDecl->prop_end(); P != E; ++P) {
@@ -1491,7 +1491,7 @@
/// properties to be implemented in super class(s) and also coming from their
/// conforming protocols.
static void CollectSuperClassPropertyImplementations(ObjCInterfaceDecl *CDecl,
- ObjCInterfaceDecl::PropertyMap& PropMap) {
+ ObjCInterfaceDecl::PropertyMap &PropMap) {
if (ObjCInterfaceDecl *SDecl = CDecl->getSuperClass()) {
while (SDecl) {
SDecl->collectPropertiesToImplement(PropMap);
More information about the cfe-commits
mailing list