gives us:
Stack dump:
0. using-directive.cpp:26:16: in compound statement ('{}')
1. using-directive.cpp:26:16: parsing function body 'A::K1::foo'
2. using-directive.cpp:25:3: parsing struct/union/class body 'A::K1'
3. using-directive.cpp:5:1: parsing namespace 'A'
4. clang using-directive.cpp
Abort
for code like:
namespace A {
...
class K1 {
void foo() { <<crash>>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66124
91177308-0d34-0410-b5e6-
96231b3b80d8
///
void Parser::ParseStructUnionBody(SourceLocation RecordLoc,
unsigned TagType, DeclTy *TagDecl) {
+ PrettyStackTraceDecl CrashInfo(TagDecl, RecordLoc, Actions,
+ PP.getSourceManager(),
+ "parsing struct/union body");
+
SourceLocation LBraceLoc = ConsumeBrace();
ParseScope StructScope(this, Scope::ClassScope|Scope::DeclScope);
TagType == DeclSpec::TST_union ||
TagType == DeclSpec::TST_class) && "Invalid TagType!");
+ PrettyStackTraceDecl CrashInfo(TagDecl, RecordLoc, Actions,
+ PP.getSourceManager(),
+ "parsing struct/union/class body");
+
SourceLocation LBraceLoc = ConsumeBrace();
if (!CurScope->isClassScope() && // Not about to define a nested class.