FunctionDecl::getBody() is getting an ASTContext argument for use in
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/clang-cc/RewriteObjC.cpp b/tools/clang-cc/RewriteObjC.cpp
index 41f532b..46f8e7e 100644
--- a/tools/clang-cc/RewriteObjC.cpp
+++ b/tools/clang-cc/RewriteObjC.cpp
@@ -994,7 +994,7 @@
ObjCMethodDecl *OMD = *I;
RewriteObjCMethodDecl(OMD, ResultStr);
SourceLocation LocStart = OMD->getLocStart();
- SourceLocation LocEnd = OMD->getBody()->getLocStart();
+ SourceLocation LocEnd = OMD->getBody(*Context)->getLocStart();
const char *startBuf = SM->getCharacterData(LocStart);
const char *endBuf = SM->getCharacterData(LocEnd);
@@ -1009,7 +1009,7 @@
ObjCMethodDecl *OMD = *I;
RewriteObjCMethodDecl(OMD, ResultStr);
SourceLocation LocStart = OMD->getLocStart();
- SourceLocation LocEnd = OMD->getBody()->getLocStart();
+ SourceLocation LocEnd = OMD->getBody(*Context)->getLocStart();
const char *startBuf = SM->getCharacterData(LocStart);
const char *endBuf = SM->getCharacterData(LocEnd);
@@ -4445,7 +4445,7 @@
// definitions using the same code.
RewriteBlocksInFunctionProtoType(FD->getType(), FD);
- if (CompoundStmt *Body = FD->getBody()) {
+ if (CompoundStmt *Body = FD->getBody(*Context)) {
CurFunctionDef = FD;
CollectPropertySetters(Body);
CurrentBody = Body;