[cfe-commits] r88821 - /cfe/trunk/lib/AST/StmtDumper.cpp

Anders Carlsson andersca at mac.com
Sat Nov 14 14:35:19 PST 2009


Author: andersca
Date: Sat Nov 14 16:35:18 2009
New Revision: 88821

URL: http://llvm.org/viewvc/llvm-project?rev=88821&view=rev
Log:
When dumping implicit cast exprs, print out whether the cast is an lvalue cast or not.

Modified:
    cfe/trunk/lib/AST/StmtDumper.cpp

Modified: cfe/trunk/lib/AST/StmtDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtDumper.cpp?rev=88821&r1=88820&r2=88821&view=diff

==============================================================================
--- cfe/trunk/lib/AST/StmtDumper.cpp (original)
+++ cfe/trunk/lib/AST/StmtDumper.cpp Sat Nov 14 16:35:18 2009
@@ -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);
 





More information about the cfe-commits mailing list