aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-05 07:32:12 +0000
committerChris Lattner <sabre@nondot.org>2009-03-05 07:32:12 +0000
commit6b91f008c5d60e2f203d6f9e313aeb2ac6d70587 (patch)
treef6479139b05e4ad772651ec2da526d52426f9426 /lib/Parse/ParseExpr.cpp
parentddcbc0a72a04a5ae2493088f1437200a9ea480b1 (diff)
if we crash while parsing a block literal, include it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 4a81d30c84..331f3181cd 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -22,6 +22,7 @@
#include "clang/Parse/Parser.h"
#include "clang/Parse/DeclSpec.h"
#include "clang/Parse/Scope.h"
+#include "clang/Basic/PrettyStackTrace.h"
#include "ExtensionRAIIObject.h"
#include "AstGuard.h"
#include "llvm/ADT/SmallVector.h"
@@ -1264,6 +1265,9 @@ Parser::OwningExprResult Parser::ParseBlockLiteralExpression() {
assert(Tok.is(tok::caret) && "block literal starts with ^");
SourceLocation CaretLoc = ConsumeToken();
+ PrettyStackTraceLoc CrashInfo(PP.getSourceManager(), CaretLoc,
+ "block literal parsing");
+
// Enter a scope to hold everything within the block. This includes the
// argument decls, decls within the compound expression, etc. This also
// allows determining whether a variable reference inside the block is
@@ -1274,7 +1278,7 @@ Parser::OwningExprResult Parser::ParseBlockLiteralExpression() {
// Inform sema that we are starting a block.
Actions.ActOnBlockStart(CaretLoc, CurScope);
-
+
// Parse the return type if present.
DeclSpec DS;
Declarator ParamInfo(DS, Declarator::BlockLiteralContext);