[cfe-commits] r66150 - /cfe/trunk/lib/Parse/ParseExpr.cpp
Chris Lattner
sabre at nondot.org
Wed Mar 4 23:32:12 PST 2009
Author: lattner
Date: Thu Mar 5 01:32:12 2009
New Revision: 66150
URL: http://llvm.org/viewvc/llvm-project?rev=66150&view=rev
Log:
if we crash while parsing a block literal, include it.
Modified:
cfe/trunk/lib/Parse/ParseExpr.cpp
Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=66150&r1=66149&r2=66150&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Thu Mar 5 01:32:12 2009
@@ -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 @@
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 @@
// 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);
More information about the cfe-commits
mailing list