aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-05 01:25:28 +0000
committerChris Lattner <sabre@nondot.org>2009-03-05 01:25:28 +0000
commit21ff9c99d3df1e4a13e6820fc2aa7a8cc6673198 (patch)
tree9b53871f7316413ea895e459cb459ca1a8f7ed67 /lib/Parse/ParseStmt.cpp
parent797b6327571f9d7b1c45404a56ddcbf9b9298ae8 (diff)
When parsing a function body, add it to the crash stack, giving us something
like: Stack dump: 0. t.c:5:10: in compound statement ('{}') 1. t.c:3:12: in compound statement ('{}') 2. t.c:3:12: parsing function body 'foo' 3. clang t.c Abort git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r--lib/Parse/ParseStmt.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index 1ecbe8bd84..cb9bdc7cfb 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -1288,6 +1288,10 @@ Parser::DeclTy *Parser::ParseFunctionStatementBody(DeclTy *Decl) {
assert(Tok.is(tok::l_brace));
SourceLocation LBraceLoc = Tok.getLocation();
+ PrettyStackTraceDecl CrashInfo(Decl, LBraceLoc, Actions,
+ PP.getSourceManager(),
+ "parsing function body");
+
// 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.