diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-05 02:09:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-05 02:09:07 +0000 |
commit | 2254a9f32830492459a6fc4d90ccd2776dab7807 (patch) | |
tree | a838312712273e1079f989da293f030b80242bbf /lib/Parse/ParseDeclCXX.cpp | |
parent | 73e80f695e141fe08315c5fdefa38c95d72299bb (diff) |
Include namespace contexts in the virtual stack trace, so we get stuff
like this:
Stack dump:
0. using-directive.cpp:9:14: in compound statement ('{}')
1. using-directive.cpp:9:14: parsing function body 'A::B::f'
2. using-directive.cpp:7:3: parsing namespace 'A::B'
3. using-directive.cpp:5:1: parsing namespace 'A'
4. clang using-directive.cpp
Abort
for testcase like like:
namespace A {
short i;
namespace B {
long i;
void f() { <<crash>>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | lib/Parse/ParseDeclCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 9f704d2ea8..7f0aa8f327 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -73,6 +73,10 @@ Parser::DeclTy *Parser::ParseNamespace(unsigned Context) { DeclTy *NamespcDecl = Actions.ActOnStartNamespaceDef(CurScope, IdentLoc, Ident, LBrace); + PrettyStackTraceDecl CrashInfo(NamespcDecl, NamespaceLoc, Actions, + PP.getSourceManager(), + "parsing namespace"); + while (Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) ParseExternalDeclaration(); |