Propagate the ASTContext to various AST traversal and lookup functions.
No functionality change (really).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/clang-cc/RewriteBlocks.cpp b/tools/clang-cc/RewriteBlocks.cpp
index f302913..3610da6 100644
--- a/tools/clang-cc/RewriteBlocks.cpp
+++ b/tools/clang-cc/RewriteBlocks.cpp
@@ -310,29 +310,41 @@
 }
 
 void RewriteBlocks::RewriteInterfaceDecl(ObjCInterfaceDecl *ClassDecl) {
-  for (ObjCInterfaceDecl::instmeth_iterator I = ClassDecl->instmeth_begin(), 
-       E = ClassDecl->instmeth_end(); I != E; ++I)
+  for (ObjCInterfaceDecl::instmeth_iterator 
+         I = ClassDecl->instmeth_begin(*Context), 
+         E = ClassDecl->instmeth_end(*Context); 
+       I != E; ++I)
     RewriteMethodDecl(*I);
-  for (ObjCInterfaceDecl::classmeth_iterator I = ClassDecl->classmeth_begin(), 
-       E = ClassDecl->classmeth_end(); I != E; ++I)
+  for (ObjCInterfaceDecl::classmeth_iterator 
+         I = ClassDecl->classmeth_begin(*Context), 
+         E = ClassDecl->classmeth_end(*Context);
+       I != E; ++I)
     RewriteMethodDecl(*I);
 }
 
 void RewriteBlocks::RewriteCategoryDecl(ObjCCategoryDecl *CatDecl) {
-  for (ObjCCategoryDecl::instmeth_iterator I = CatDecl->instmeth_begin(), 
-       E = CatDecl->instmeth_end(); I != E; ++I)
+  for (ObjCCategoryDecl::instmeth_iterator 
+         I = CatDecl->instmeth_begin(*Context), 
+         E = CatDecl->instmeth_end(*Context); 
+       I != E; ++I)
     RewriteMethodDecl(*I);
-  for (ObjCCategoryDecl::classmeth_iterator I = CatDecl->classmeth_begin(), 
-       E = CatDecl->classmeth_end(); I != E; ++I)
+  for (ObjCCategoryDecl::classmeth_iterator 
+         I = CatDecl->classmeth_begin(*Context), 
+         E = CatDecl->classmeth_end(*Context);
+       I != E; ++I)
     RewriteMethodDecl(*I);
 }
 
 void RewriteBlocks::RewriteProtocolDecl(ObjCProtocolDecl *PDecl) {
-  for (ObjCProtocolDecl::instmeth_iterator I = PDecl->instmeth_begin(), 
-       E = PDecl->instmeth_end(); I != E; ++I)
+  for (ObjCProtocolDecl::instmeth_iterator 
+         I = PDecl->instmeth_begin(*Context), 
+         E = PDecl->instmeth_end(*Context); 
+       I != E; ++I)
     RewriteMethodDecl(*I);
-  for (ObjCProtocolDecl::classmeth_iterator I = PDecl->classmeth_begin(), 
-       E = PDecl->classmeth_end(); I != E; ++I)
+  for (ObjCProtocolDecl::classmeth_iterator 
+         I = PDecl->classmeth_begin(*Context), 
+         E = PDecl->classmeth_end(*Context); 
+       I != E; ++I)
     RewriteMethodDecl(*I);
 }
 
@@ -1138,8 +1150,8 @@
   }
   if (RecordDecl *RD = dyn_cast<RecordDecl>(D)) {
     if (RD->isDefinition()) {
-      for (RecordDecl::field_iterator i = RD->field_begin(), 
-             e = RD->field_end(); i != e; ++i) {
+      for (RecordDecl::field_iterator i = RD->field_begin(*Context), 
+             e = RD->field_end(*Context); i != e; ++i) {
         FieldDecl *FD = *i;
         if (isBlockPointerType(FD->getType()))
           RewriteBlockPointerDecl(FD);