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
diff --git a/lib/AST/StmtDumper.cpp b/lib/AST/StmtDumper.cpp
index cf71d6b..93bf875 100644
--- a/lib/AST/StmtDumper.cpp
+++ b/lib/AST/StmtDumper.cpp
@@ -115,6 +115,7 @@
// 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 @@
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);