Modified dumping of Decl information to including the Decl type.

llvm-svn: 41796
This commit is contained in:
Ted Kremenek 2007-09-10 17:32:55 +00:00
parent 0319fc07fc
commit 5f64ca8ec5
1 changed files with 19 additions and 2 deletions

View File

@ -256,8 +256,25 @@ void StmtDumper::VisitExpr(Expr *Node) {
void StmtDumper::VisitDeclRefExpr(DeclRefExpr *Node) { void StmtDumper::VisitDeclRefExpr(DeclRefExpr *Node) {
DumpExpr(Node); DumpExpr(Node);
fprintf(F, " Decl='%s' %p", Node->getDecl()->getName(),
(void*)Node->getDecl()); fprintf(F, " ");
switch (Node->getDecl()->getKind()) {
case Decl::Function: fprintf(F,"FunctionDecl"); break;
case Decl::BlockVariable: fprintf(F,"BlockVariable"); break;
case Decl::FileVariable: fprintf(F,"FileVariable"); break;
case Decl::ParmVariable: fprintf(F,"ParmVariable"); break;
case Decl::EnumConstant: fprintf(F,"EnumConstant"); break;
case Decl::Typedef: fprintf(F,"Typedef"); break;
case Decl::Struct: fprintf(F,"Struct"); break;
case Decl::Union: fprintf(F,"Union"); break;
case Decl::Class: fprintf(F,"Class"); break;
case Decl::Enum: fprintf(F,"Enum"); break;
case Decl::ObjcInterface: fprintf(F,"ObjcInterface"); break;
case Decl::ObjcClass: fprintf(F,"ObjcClass"); break;
default: fprintf(F,"Decl"); break;
}
fprintf(F, "='%s' %p", Node->getDecl()->getName(), (void*)Node->getDecl());
} }
void StmtDumper::VisitPreDefinedExpr(PreDefinedExpr *Node) { void StmtDumper::VisitPreDefinedExpr(PreDefinedExpr *Node) {