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/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 267fc0b..0a68ee4 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -1779,8 +1779,8 @@
MemRegionManager &MRMgr = state.getManager().getRegionManager();
// Iterate through the fields and construct new symbols.
- for (RecordDecl::field_iterator FI=RD->field_begin(),
- FE=RD->field_end(); FI!=FE; ++FI) {
+ for (RecordDecl::field_iterator FI=RD->field_begin(Ctx),
+ FE=RD->field_end(Ctx); FI!=FE; ++FI) {
// For now just handle scalar fields.
FieldDecl *FD = *FI;
diff --git a/lib/Analysis/CheckObjCInstMethSignature.cpp b/lib/Analysis/CheckObjCInstMethSignature.cpp
index a59ed88..97e77cc 100644
--- a/lib/Analysis/CheckObjCInstMethSignature.cpp
+++ b/lib/Analysis/CheckObjCInstMethSignature.cpp
@@ -97,8 +97,8 @@
ASTContext& Ctx = BR.getContext();
while (C && NumMethods) {
- for (ObjCInterfaceDecl::instmeth_iterator I=C->instmeth_begin(),
- E=C->instmeth_end(); I!=E; ++I) {
+ for (ObjCInterfaceDecl::instmeth_iterator I=C->instmeth_begin(Ctx),
+ E=C->instmeth_end(Ctx); I!=E; ++I) {
ObjCMethodDecl* M = *I;
Selector S = M->getSelector();
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index a126792..5e60363 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -814,7 +814,8 @@
llvm::ImmutableList<SVal> StructVal = getBasicVals().getEmptySValList();
- std::vector<FieldDecl *> Fields(RD->field_begin(), RD->field_end());
+ std::vector<FieldDecl *> Fields(RD->field_begin(getContext()),
+ RD->field_end(getContext()));
for (std::vector<FieldDecl *>::reverse_iterator Field = Fields.rbegin(),
FieldEnd = Fields.rend();
@@ -1166,7 +1167,8 @@
nonloc::CompoundVal& CV = cast<nonloc::CompoundVal>(V);
nonloc::CompoundVal::iterator VI = CV.begin(), VE = CV.end();
- RecordDecl::field_iterator FI = RD->field_begin(), FE = RD->field_end();
+ RecordDecl::field_iterator FI = RD->field_begin(getContext()),
+ FE = RD->field_end(getContext());
for (; FI != FE; ++FI, ++VI) {