From d98ecd615ff0b0985b7145c56fe92821b70559dd Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Sun, 26 Apr 2009 21:08:36 +0000 Subject: The mysterious bug turns out to be an incredibly bone-headed mistake. llvm-svn: 70160 --- clang/lib/Parse/ParseStmt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Parse/ParseStmt.cpp') diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index ce887287360..35348d58520 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/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)); -- cgit v1.2.3