r203835 - Renaming the recently-created (r203830) props() range API to properties() for clarity.
Aaron Ballman
aaron at aaronballman.com
Thu Mar 13 12:11:51 PDT 2014
Author: aaronballman
Date: Thu Mar 13 14:11:50 2014
New Revision: 203835
URL: http://llvm.org/viewvc/llvm-project?rev=203835&view=rev
Log:
Renaming the recently-created (r203830) props() range API to properties() for clarity.
Modified:
cfe/trunk/include/clang/AST/DeclObjC.h
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
cfe/trunk/lib/ARCMigrate/TransProperties.cpp
cfe/trunk/lib/AST/DeclObjC.cpp
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp
cfe/trunk/lib/Rewrite/Frontend/RewriteObjC.cpp
cfe/trunk/lib/Sema/SemaCodeComplete.cpp
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
cfe/trunk/lib/Sema/SemaObjCProperty.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Thu Mar 13 14:11:50 2014
@@ -524,7 +524,7 @@ public:
typedef llvm::iterator_range<specific_decl_iterator<ObjCPropertyDecl>>
prop_range;
- prop_range props() const { return prop_range(prop_begin(), prop_end()); }
+ prop_range properties() const { return prop_range(prop_begin(), prop_end()); }
prop_iterator prop_begin() const {
return prop_iterator(decls_begin());
}
Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Thu Mar 13 14:11:50 2014
@@ -486,7 +486,7 @@ void ObjCMigrateASTConsumer::migrateObjC
if (!(ASTMigrateActions & FrontendOptions::ObjCMT_ReturnsInnerPointerProperty))
return;
- for (auto *Prop : D->props()) {
+ for (auto *Prop : D->properties()) {
if ((ASTMigrateActions & FrontendOptions::ObjCMT_Annotation) &&
!Prop->isDeprecated())
migratePropertyNsReturnsInnerPointer(Ctx, Prop);
@@ -503,7 +503,7 @@ ClassImplementsAllMethodsAndProperties(A
// in class interface.
bool HasAtleastOneRequiredProperty = false;
if (const ObjCProtocolDecl *PDecl = Protocol->getDefinition())
- for (const auto *Property : PDecl->props()) {
+ for (const auto *Property : PDecl->properties()) {
if (Property->getPropertyImplementation() == ObjCPropertyDecl::Optional)
continue;
HasAtleastOneRequiredProperty = true;
Modified: cfe/trunk/lib/ARCMigrate/TransProperties.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/TransProperties.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/TransProperties.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/TransProperties.cpp Thu Mar 13 14:11:50 2014
@@ -75,7 +75,7 @@ public:
static void collectProperties(ObjCContainerDecl *D, AtPropDeclsTy &AtProps,
AtPropDeclsTy *PrevAtProps = 0) {
- for (auto *Prop : D->props()) {
+ for (auto *Prop : D->properties()) {
if (Prop->getAtLoc().isInvalid())
continue;
unsigned RawLoc = Prop->getAtLoc().getRawEncoding();
Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Thu Mar 13 14:11:50 2014
@@ -125,7 +125,7 @@ ObjCContainerDecl::HasUserDeclaredSetter
// Also search through the categories looking for a 'readwrite' declaration
// of this property. If one found, presumably a setter will be provided
// (properties declared in categories will not get auto-synthesized).
- for (const auto *P : Cat->props())
+ for (const auto *P : Cat->properties())
if (P->getIdentifier() == Property->getIdentifier()) {
if (P->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_readwrite)
return true;
@@ -285,7 +285,7 @@ ObjCInterfaceDecl::FindPropertyVisibleIn
void ObjCInterfaceDecl::collectPropertiesToImplement(PropertyMap &PM,
PropertyDeclOrder &PO) const {
- for (auto *Prop : props()) {
+ for (auto *Prop : properties()) {
PM[Prop->getIdentifier()] = Prop;
PO.push_back(Prop);
}
@@ -1111,7 +1111,7 @@ ObjCMethodDecl::findPropertyDecl(bool Ch
bool IsGetter = (NumArgs == 0);
- for (const auto *I : Container->props()) {
+ for (const auto *I : Container->properties()) {
Selector NextSel = IsGetter ? I->getGetterName()
: I->getSetterName();
if (NextSel == Sel)
@@ -1601,7 +1601,7 @@ void ObjCProtocolDecl::collectProperties
PropertyDeclOrder &PO) const {
if (const ObjCProtocolDecl *PDecl = getDefinition()) {
- for (auto *Prop : PDecl->props()) {
+ for (auto *Prop : PDecl->properties()) {
// Insert into PM if not there already.
PM.insert(std::make_pair(Prop->getIdentifier(), Prop));
PO.push_back(Prop);
@@ -1619,7 +1619,7 @@ void ObjCProtocolDecl::collectInheritedP
ProtocolPropertyMap &PM) const {
if (const ObjCProtocolDecl *PDecl = getDefinition()) {
bool MatchFound = false;
- for (auto *Prop : PDecl->props()) {
+ for (auto *Prop : PDecl->properties()) {
if (Prop == Property)
continue;
if (Prop->getIdentifier() == Property->getIdentifier()) {
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Mar 13 14:11:50 2014
@@ -1668,7 +1668,7 @@ llvm::DIType CGDebugInfo::CreateType(con
}
// Create entries for all of the properties.
- for (const auto *PD : ID->props()) {
+ for (const auto *PD : ID->properties()) {
SourceLocation Loc = PD->getLocation();
llvm::DIFile PUnit = getOrCreateFile(Loc);
unsigned PLine = getLineNumber(Loc);
Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Thu Mar 13 14:11:50 2014
@@ -1822,7 +1822,7 @@ void CGObjCGNU::GenerateProtocol(const O
// Add all of the property methods need adding to the method list and to the
// property metadata list.
- for (auto *property : PD->props()) {
+ for (auto *property : PD->properties()) {
std::vector<llvm::Constant*> Fields;
Fields.push_back(MakePropertyEncodingString(property, 0));
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Thu Mar 13 14:11:50 2014
@@ -2778,7 +2778,7 @@ PushProtocolProperties(llvm::SmallPtrSet
for (ObjCProtocolDecl::protocol_iterator P = Proto->protocol_begin(),
E = Proto->protocol_end(); P != E; ++P)
PushProtocolProperties(PropertySet, Properties, Container, (*P), ObjCTypes);
- for (const auto *PD : Proto->props()) {
+ for (const auto *PD : Proto->properties()) {
if (!PropertySet.insert(PD->getIdentifier()))
continue;
llvm::Constant *Prop[] = {
@@ -2807,7 +2807,7 @@ llvm::Constant *CGObjCCommonMac::EmitPro
const ObjCCommonTypesHelper &ObjCTypes) {
SmallVector<llvm::Constant *, 16> Properties;
llvm::SmallPtrSet<const IdentifierInfo*, 16> PropertySet;
- for (const auto *PD : OCD->props()) {
+ for (const auto *PD : OCD->properties()) {
PropertySet.insert(PD->getIdentifier());
llvm::Constant *Prop[] = {
GetPropertyName(PD->getIdentifier()),
Modified: cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp Thu Mar 13 14:11:50 2014
@@ -1160,7 +1160,7 @@ void RewriteModernObjC::RewriteCategoryD
ReplaceText(LocStart, 0, "// ");
}
- for (auto *I : CatDecl->props())
+ for (auto *I : CatDecl->properties())
RewriteProperty(I);
for (ObjCCategoryDecl::instmeth_iterator
@@ -1193,7 +1193,7 @@ void RewriteModernObjC::RewriteProtocolD
I != E; ++I)
RewriteMethodDeclaration(*I);
- for (auto *I : PDecl->props())
+ for (auto *I : PDecl->properties())
RewriteProperty(I);
// Lastly, comment out the @end.
@@ -1451,7 +1451,7 @@ void RewriteModernObjC::RewriteInterface
// Mark this typedef as having been written into its c++ equivalent.
ObjCWrittenInterfaces.insert(ClassDecl->getCanonicalDecl());
- for (auto *I : ClassDecl->props())
+ for (auto *I : ClassDecl->properties())
RewriteProperty(I);
for (ObjCInterfaceDecl::instmeth_iterator
I = ClassDecl->instmeth_begin(), E = ClassDecl->instmeth_end();
@@ -7086,7 +7086,7 @@ void RewriteModernObjC::RewriteObjCProto
PDecl->getNameAsString(), false);
// Protocol's property metadata.
- SmallVector<ObjCPropertyDecl *, 8> ProtocolProperties(PDecl->props());
+ SmallVector<ObjCPropertyDecl *, 8> ProtocolProperties(PDecl->properties());
Write_prop_list_t_initializer(*this, Context, Result, ProtocolProperties,
/* Container */0,
"_OBJC_PROTOCOL_PROPERTIES_",
@@ -7303,7 +7303,7 @@ void RewriteModernObjC::RewriteObjCClass
IDecl->getNameAsString());
// Protocol's property metadata.
- SmallVector<ObjCPropertyDecl *, 8> ClassProperties(CDecl->props());
+ SmallVector<ObjCPropertyDecl *, 8> ClassProperties(CDecl->properties());
Write_prop_list_t_initializer(*this, Context, Result, ClassProperties,
/* Container */IDecl,
"_OBJC_$_PROP_LIST_",
@@ -7558,7 +7558,7 @@ void RewriteModernObjC::RewriteObjCCateg
FullCategoryName);
// Protocol's property metadata.
- SmallVector<ObjCPropertyDecl *, 8> ClassProperties(CDecl->props());
+ SmallVector<ObjCPropertyDecl *, 8> ClassProperties(CDecl->properties());
Write_prop_list_t_initializer(*this, Context, Result, ClassProperties,
/* Container */IDecl,
"_OBJC_$_PROP_LIST_",
Modified: cfe/trunk/lib/Rewrite/Frontend/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/Frontend/RewriteObjC.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/Frontend/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/Frontend/RewriteObjC.cpp Thu Mar 13 14:11:50 2014
@@ -980,7 +980,7 @@ void RewriteObjC::RewriteCategoryDecl(Ob
// FIXME: handle category headers that are declared across multiple lines.
ReplaceText(LocStart, 0, "// ");
- for (auto *I : CatDecl->props())
+ for (auto *I : CatDecl->properties())
RewriteProperty(I);
for (ObjCCategoryDecl::instmeth_iterator
@@ -1013,7 +1013,7 @@ void RewriteObjC::RewriteProtocolDecl(Ob
I != E; ++I)
RewriteMethodDeclaration(*I);
- for (auto *I : PDecl->props())
+ for (auto *I : PDecl->properties())
RewriteProperty(I);
// Lastly, comment out the @end.
@@ -1243,7 +1243,7 @@ void RewriteObjC::RewriteInterfaceDecl(O
}
RewriteObjCInternalStruct(ClassDecl, ResultStr);
- for (auto *I : ClassDecl->props())
+ for (auto *I : ClassDecl->properties())
RewriteProperty(I);
for (ObjCInterfaceDecl::instmeth_iterator
I = ClassDecl->instmeth_begin(), E = ClassDecl->instmeth_end();
Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Thu Mar 13 14:11:50 2014
@@ -3458,7 +3458,7 @@ static void AddObjCProperties(ObjCContai
Container = getContainerDef(Container);
// Add properties in this container.
- for (const auto *P : Container->props())
+ for (const auto *P : Container->properties())
if (AddedProperties.insert(P->getIdentifier()))
Results.MaybeAddResult(Result(P, Results.getBasePriority(P), 0),
CurContext);
@@ -6972,7 +6972,7 @@ void Sema::CodeCompleteObjCMethodDecl(Sc
}
for (unsigned I = 0, N = Containers.size(); I != N; ++I)
- for (auto *P : Containers[I]->props())
+ for (auto *P : Containers[I]->properties())
AddObjCKeyValueCompletions(P, IsInstanceMethod, ReturnType, Context,
KnownSelectors, Results);
}
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Thu Mar 13 14:11:50 2014
@@ -2675,7 +2675,7 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceR
// ProcessPropertyDecl is responsible for diagnosing conflicts with any
// user-defined setter/getter. It also synthesizes setter/getter methods
// and adds them to the DeclContext and global method pools.
- for (auto *I : CDecl->props())
+ for (auto *I : CDecl->properties())
ProcessPropertyDecl(I, CDecl);
CDecl->setAtEndRange(AtEnd);
}
@@ -2691,7 +2691,7 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceR
Ext = IDecl->visible_extensions_begin(),
ExtEnd = IDecl->visible_extensions_end();
Ext != ExtEnd; ++Ext) {
- for (const auto *Property : Ext->props()) {
+ for (const auto *Property : Ext->properties()) {
// Skip over properties declared @dynamic
if (const ObjCPropertyImplDecl *PIDecl
= IC->FindPropertyImplDecl(Property->getIdentifier()))
Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Thu Mar 13 14:11:50 2014
@@ -1446,7 +1446,7 @@ static void CollectImmediateProperties(O
bool IncludeProtocols = true) {
if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(CDecl)) {
- for (auto *Prop : IDecl->props())
+ for (auto *Prop : IDecl->properties())
PropMap[Prop->getIdentifier()] = Prop;
if (IncludeProtocols) {
// Scan through class's protocols.
@@ -1458,7 +1458,7 @@ static void CollectImmediateProperties(O
}
if (ObjCCategoryDecl *CATDecl = dyn_cast<ObjCCategoryDecl>(CDecl)) {
if (!CATDecl->IsClassExtension())
- for (auto *Prop : CATDecl->props())
+ for (auto *Prop : CATDecl->properties())
PropMap[Prop->getIdentifier()] = Prop;
if (IncludeProtocols) {
// Scan through class's protocols.
@@ -1468,7 +1468,7 @@ static void CollectImmediateProperties(O
}
}
else if (ObjCProtocolDecl *PDecl = dyn_cast<ObjCProtocolDecl>(CDecl)) {
- for (auto *Prop : PDecl->props()) {
+ for (auto *Prop : PDecl->properties()) {
ObjCPropertyDecl *PropertyFromSuper = SuperPropMap[Prop->getIdentifier()];
// Exclude property for protocols which conform to class's super-class,
// as super-class has to implement the property.
@@ -1515,7 +1515,7 @@ Sema::IvarBacksCurrentMethodAccessor(Obj
// look up a property declaration whose one of its accessors is implemented
// by this method.
- for (const auto *Property : IFace->props()) {
+ for (const auto *Property : IFace->properties()) {
if ((Property->getGetterName() == IMD->getSelector() ||
Property->getSetterName() == IMD->getSelector()) &&
(Property->getPropertyIvarDecl() == IV))
@@ -1723,7 +1723,7 @@ void Sema::DiagnoseUnimplementedProperti
}
// Add the properties of 'PDecl' to the list of properties that
// need to be implemented.
- for (auto *PropDecl : PDecl->props()) {
+ for (auto *PropDecl : PDecl->properties()) {
if ((*LazyMap)[PropDecl->getIdentifier()])
continue;
PropMap[PropDecl->getIdentifier()] = PropDecl;
@@ -1786,7 +1786,7 @@ Sema::AtomicPropertySetterGetterRules (O
// Rules apply in non-GC mode only
if (getLangOpts().getGC() != LangOptions::NonGC)
return;
- for (const auto *Property : IDecl->props()) {
+ for (const auto *Property : IDecl->properties()) {
ObjCMethodDecl *GetterMethod = 0;
ObjCMethodDecl *SetterMethod = 0;
bool LookedUpGetterSetter = false;
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp?rev=203835&r1=203834&r2=203835&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp Thu Mar 13 14:11:50 2014
@@ -124,7 +124,7 @@ void DirectIvarAssignment::checkASTDecl(
IvarToPropertyMapTy IvarToPropMap;
// Find all properties for this class.
- for (const auto *PD : InterD->props()) {
+ for (const auto *PD : InterD->properties()) {
// Find the corresponding IVar.
const ObjCIvarDecl *ID = findPropertyBackingIvar(PD, InterD,
Mgr.getASTContext());
More information about the cfe-commits
mailing list