aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Parse/ParseCXXInlineMethods.cpp2
-rw-r--r--lib/Parse/ParseStmt.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Parse/ParseCXXInlineMethods.cpp b/lib/Parse/ParseCXXInlineMethods.cpp
index a2f93b46ca..525b088714 100644
--- a/lib/Parse/ParseCXXInlineMethods.cpp
+++ b/lib/Parse/ParseCXXInlineMethods.cpp
@@ -145,7 +145,7 @@ void Parser::ParseLexedMethodDefs() {
if (Tok.is(tok::kw_try)) {
ParseFunctionTryBlock(LM.D);
- return;
+ continue;
}
if (Tok.is(tok::colon))
ParseConstructorInitializer(LM.D);
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index ce88728736..35348d5852 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -1324,11 +1324,12 @@ Parser::DeclPtrTy Parser::ParseFunctionTryBlock(DeclPtrTy Decl) {
if (Tok.is(tok::colon))
ParseConstructorInitializer(Decl);
+ SourceLocation LBraceLoc = Tok.getLocation();
OwningStmtResult FnBody(ParseCXXTryBlockCommon(TryLoc));
// If we failed to parse the try-catch, we just give the function an empty
// compound statement as the body.
if (FnBody.isInvalid())
- FnBody = Actions.ActOnCompoundStmt(TryLoc, TryLoc,
+ FnBody = Actions.ActOnCompoundStmt(LBraceLoc, LBraceLoc,
MultiStmtArg(Actions), false);
return Actions.ActOnFinishFunctionBody(Decl, move(FnBody));