r203262 - Renaming the chains() ranged iterator to chain() per suggestion by Richard Smith.

Aaron Ballman aaron at aaronballman.com
Fri Mar 7 10:36:16 PST 2014


Author: aaronballman
Date: Fri Mar  7 12:36:15 2014
New Revision: 203262

URL: http://llvm.org/viewvc/llvm-project?rev=203262&view=rev
Log:
Renaming the chains() ranged iterator to chain() per suggestion by Richard Smith.

Modified:
    cfe/trunk/include/clang/AST/Decl.h
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
    cfe/trunk/lib/AST/ASTImporter.cpp
    cfe/trunk/lib/AST/ExprConstant.cpp
    cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
    cfe/trunk/lib/CodeGen/CGClass.cpp
    cfe/trunk/lib/Sema/SemaDecl.cpp
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp
    cfe/trunk/lib/Sema/SemaExpr.cpp
    cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
    cfe/trunk/lib/Serialization/ASTWriterDecl.cpp

Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Fri Mar  7 12:36:15 2014
@@ -2333,11 +2333,11 @@ public:
   typedef NamedDecl * const *chain_iterator;
   typedef llvm::iterator_range<chain_iterator> chain_range;
 
-  chain_range chains() const {
+  chain_range chain() const {
     return chain_range(Chaining, Chaining + ChainingSize);
   }
-  chain_iterator chain_begin() const { return chains().begin(); }
-  chain_iterator chain_end() const  { return chains().end(); }
+  chain_iterator chain_begin() const { return chain().begin(); }
+  chain_iterator chain_end() const  { return chain().end(); }
 
   unsigned getChainingSize() const { return ChainingSize; }
 

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h Fri Mar  7 12:36:15 2014
@@ -676,7 +676,7 @@ inline SVal ProgramState::getLValue(cons
 inline SVal ProgramState::getLValue(const IndirectFieldDecl *D,
                                     SVal Base) const {
   StoreManager &SM = *getStateManager().StoreMgr;
-  for (const auto *I : D->chains()) {
+  for (const auto *I : D->chain()) {
     Base = SM.getLValueField(cast<FieldDecl>(I), Base);
   }
 

Modified: cfe/trunk/lib/AST/ASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTImporter.cpp (original)
+++ cfe/trunk/lib/AST/ASTImporter.cpp Fri Mar  7 12:36:15 2014
@@ -2967,7 +2967,7 @@ Decl *ASTNodeImporter::VisitIndirectFiel
     new (Importer.getToContext())NamedDecl*[D->getChainingSize()];
 
   unsigned i = 0;
-  for (auto *PI : D->chains()) {
+  for (auto *PI : D->chain()) {
     Decl *D = Importer.Import(PI);
     if (!D)
       return 0;

Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Fri Mar  7 12:36:15 2014
@@ -1832,7 +1832,7 @@ static bool HandleLValueMember(EvalInfo
 static bool HandleLValueIndirectMember(EvalInfo &Info, const Expr *E,
                                        LValue &LVal,
                                        const IndirectFieldDecl *IFD) {
-  for (const auto *C : IFD->chains())
+  for (const auto *C : IFD->chain())
     if (!HandleLValueMember(Info, E, LVal, cast<FieldDecl>(C)))
       return false;
   return true;
@@ -3720,7 +3720,7 @@ static bool HandleConstructorCall(Source
     } else if (IndirectFieldDecl *IFD = (*I)->getIndirectMember()) {
       // Walk the indirect field decl's chain to find the object to initialize,
       // and make sure we've initialized every step along it.
-      for (auto *C : IFD->chains()) {
+      for (auto *C : IFD->chain()) {
         FD = cast<FieldDecl>(C);
         CXXRecordDecl *CD = cast<CXXRecordDecl>(FD->getParent());
         // Switch the union field if it differs. This happens if we had

Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Fri Mar  7 12:36:15 2014
@@ -3002,7 +3002,7 @@ uint64_t ASTContext::getFieldOffset(cons
     const IndirectFieldDecl *IFD = cast<IndirectFieldDecl>(VD);
 
     OffsetInBits = 0;
-    for (const auto *CI : IFD->chains())
+    for (const auto *CI : IFD->chain())
       OffsetInBits += ::getFieldOffset(*this, cast<FieldDecl>(CI));
   }
 

Modified: cfe/trunk/lib/CodeGen/CGClass.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGClass.cpp?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGClass.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGClass.cpp Fri Mar  7 12:36:15 2014
@@ -549,7 +549,7 @@ static void EmitMemberInitializer(CodeGe
     // If we are initializing an anonymous union field, drill down to
     // the field.
     IndirectFieldDecl *IndirectField = MemberInit->getIndirectMember();
-    for (const auto *I : IndirectField->chains())
+    for (const auto *I : IndirectField->chain())
       LHS = CGF.EmitLValueForFieldInitialization(LHS, cast<FieldDecl>(I));
     FieldType = MemberInit->getIndirectMember()->getAnonField()->getType();
   } else {

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Fri Mar  7 12:36:15 2014
@@ -3487,7 +3487,7 @@ static bool InjectAnonymousStructOrUnion
         //   anonymous union is declared.
         unsigned OldChainingSize = Chaining.size();
         if (IndirectFieldDecl *IF = dyn_cast<IndirectFieldDecl>(VD))
-          for (auto *PI : IF->chains())
+          for (auto *PI : IF->chain())
             Chaining.push_back(PI);
         else
           Chaining.push_back(VD);

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Fri Mar  7 12:36:15 2014
@@ -3413,7 +3413,7 @@ struct BaseAndFieldInfo {
     if (!Indirect)
       return isInactiveUnionMember(Field);
 
-    for (auto *C : Indirect->chains()) {
+    for (auto *C : Indirect->chain()) {
       FieldDecl *Field = dyn_cast<FieldDecl>(C);
       if (Field && isInactiveUnionMember(Field))
         return true;
@@ -3562,7 +3562,7 @@ bool Sema::SetCtorInitializers(CXXConstr
       Info.AllBaseFields[Member->getAnyMember()] = Member;
 
       if (IndirectFieldDecl *F = Member->getIndirectMember()) {
-        for (auto *C : F->chains()) {
+        for (auto *C : F->chain()) {
           FieldDecl *FD = dyn_cast<FieldDecl>(C);
           if (FD && FD->getParent()->isUnion())
             Info.ActiveUnionMember.insert(std::make_pair(

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Fri Mar  7 12:36:15 2014
@@ -10229,7 +10229,7 @@ ExprResult Sema::BuildBuiltinOffsetOf(So
     }
 
     if (IndirectMemberDecl) {
-      for (auto *FI : IndirectMemberDecl->chains()) {
+      for (auto *FI : IndirectMemberDecl->chain()) {
         assert(isa<FieldDecl>(FI));
         Comps.push_back(OffsetOfNode(OC.LocStart,
                                      cast<FieldDecl>(FI), OC.LocEnd));

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Fri Mar  7 12:36:15 2014
@@ -562,7 +562,7 @@ Decl *TemplateDeclInstantiator::VisitInd
     new (SemaRef.Context)NamedDecl*[D->getChainingSize()];
 
   int i = 0;
-  for (auto *PI : D->chains()) {
+  for (auto *PI : D->chain()) {
     NamedDecl *Next = SemaRef.FindInstantiatedDecl(D->getLocation(), PI,
                                               TemplateArgs);
     if (!Next)

Modified: cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterDecl.cpp?rev=203262&r1=203261&r2=203262&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterDecl.cpp Fri Mar  7 12:36:15 2014
@@ -686,7 +686,7 @@ void ASTDeclWriter::VisitIndirectFieldDe
   VisitValueDecl(D);
   Record.push_back(D->getChainingSize());
 
-  for (const auto *P : D->chains())
+  for (const auto *P : D->chain())
     Writer.AddDeclRef(P, Record);
   Code = serialization::DECL_INDIRECTFIELD;
 }





More information about the cfe-commits mailing list