]> granicus.if.org Git - clang/commitdiff
When dumping implicit cast exprs, print out whether the cast is an lvalue cast or...
authorAnders Carlsson <andersca@mac.com>
Sat, 14 Nov 2009 22:35:18 +0000 (22:35 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 14 Nov 2009 22:35:18 +0000 (22:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88821 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/StmtDumper.cpp

index cf71d6b986a2b8ed70a6e9d544dc2482692f39b5..93bf8755d580528f3112ea8f9da65d498b254cf4 100644 (file)
@@ -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);