diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-03-05 07:32:12 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-03-05 07:32:12 +0000 | 
| commit | f68012072c304879ca0c4d7d4013ebfd763e5efd (patch) | |
| tree | 6a9cb7ba36ed6807184890cb21fb443e5423df85 /clang/lib/Parse | |
| parent | f02db35b05920e61384dd8e5be98a66f6af2335e (diff) | |
| download | bcm5719-llvm-f68012072c304879ca0c4d7d4013ebfd763e5efd.tar.gz bcm5719-llvm-f68012072c304879ca0c4d7d4013ebfd763e5efd.zip  | |
if we crash while parsing a block literal, include it.
llvm-svn: 66150
Diffstat (limited to 'clang/lib/Parse')
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 4a81d30c846..331f3181cd4 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/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);  | 

