From 6601057f41e9bf72473bf54a5ebd7b383c8207e1 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 14 Nov 2009 22:35:18 +0000 Subject: [PATCH] When dumping implicit cast exprs, print out whether the cast is an lvalue cast or not. llvm-svn: 88821 --- clang/lib/AST/StmtDumper.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clang/lib/AST/StmtDumper.cpp b/clang/lib/AST/StmtDumper.cpp index cf71d6b986a2..93bf8755d580 100644 --- a/clang/lib/AST/StmtDumper.cpp +++ b/clang/lib/AST/StmtDumper.cpp @@ -115,6 +115,7 @@ namespace { // Exprs void VisitExpr(Expr *Node); void VisitCastExpr(CastExpr *Node); + void VisitImplicitCastExpr(ImplicitCastExpr *Node); void VisitDeclRefExpr(DeclRefExpr *Node); void VisitPredefinedExpr(PredefinedExpr *Node); void VisitCharacterLiteral(CharacterLiteral *Node); @@ -301,6 +302,12 @@ void StmtDumper::VisitCastExpr(CastExpr *Node) { fprintf(F, " <%s>", Node->getCastKindName()); } +void StmtDumper::VisitImplicitCastExpr(ImplicitCastExpr *Node) { + VisitCastExpr(Node); + if (Node->isLvalueCast()) + fprintf(F, " lvalue"); +} + void StmtDumper::VisitDeclRefExpr(DeclRefExpr *Node) { DumpExpr(Node); -- GitLab