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/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index cd0e882..b55bddf 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/lib/AST/StmtPrinter.cpp
@@ -148,7 +148,11 @@
if (RecordDecl *RD = dyn_cast<RecordDecl>(TD)) {
OS << "{\n";
IndentLevel += 1;
- for (RecordDecl::field_iterator i = RD->field_begin(); i != RD->field_end(); ++i) {
+ // FIXME: The context passed to field_begin/field_end should
+ // never be NULL!
+ ASTContext *Context = 0;
+ for (RecordDecl::field_iterator i = RD->field_begin(*Context);
+ i != RD->field_end(*Context); ++i) {
PrintFieldDecl(*i);
IndentLevel -= 1;
}