Simplify the interface to ParseFunctionStatementBody to not take 
locations that are the current tok loc.  Note that inline C++ methods
have a big fixme that could cause a crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66113 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index 4f7affc..1ecbe8b 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -1284,8 +1284,10 @@
   return true;
 }
 
-Parser::DeclTy *Parser::ParseFunctionStatementBody(DeclTy *Decl, 
-                                           SourceLocation L, SourceLocation R) {
+Parser::DeclTy *Parser::ParseFunctionStatementBody(DeclTy *Decl) {
+  assert(Tok.is(tok::l_brace));
+  SourceLocation LBraceLoc = Tok.getLocation();
+         
   // Do not enter a scope for the brace, as the arguments are in the same scope
   // (the function body) as the body itself.  Instead, just read the statement
   // list and put it into a CompoundStmt for safe keeping.
@@ -1293,7 +1295,8 @@
 
   // If the function body could not be parsed, make a bogus compoundstmt.
   if (FnBody.isInvalid())
-    FnBody = Actions.ActOnCompoundStmt(L, R, MultiStmtArg(Actions), false);
+    FnBody = Actions.ActOnCompoundStmt(LBraceLoc, LBraceLoc, 
+                                       MultiStmtArg(Actions), false);
 
   return Actions.ActOnFinishFunctionBody(Decl, move(FnBody));
 }