aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-11-14 22:35:18 +0000
committerAnders Carlsson <andersca@mac.com>2009-11-14 22:35:18 +0000
commit0e489ea67da94ca5ba3df67cab4f0da61d56367d (patch)
tree75f5f095078bd63a05fec4ebf36a2b0bc600d4eb
parent9a8a83b8fe5be9a4ca20ec6eeaafaf201ce594f9 (diff)
When dumping implicit cast exprs, print out whether the cast is an lvalue cast or not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88821 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AST/StmtDumper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/StmtDumper.cpp b/lib/AST/StmtDumper.cpp
index cf71d6b986..93bf8755d5 100644
--- a/lib/AST/StmtDumper.cpp
+++ b/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);