[cfe-commits] r66123 - /cfe/trunk/lib/Parse/ParseDeclCXX.cpp
Chris Lattner
sabre at nondot.org
Wed Mar 4 18:09:07 PST 2009
Author: lattner
Date: Wed Mar 4 20:09:07 2009
New Revision: 66123
URL: http://llvm.org/viewvc/llvm-project?rev=66123&view=rev
Log:
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>>
Modified:
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=66123&r1=66122&r2=66123&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Wed Mar 4 20:09:07 2009
@@ -73,6 +73,10 @@
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();
More information about the cfe-commits
mailing list