diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-09-09 23:47:53 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-09-09 23:47:53 +0000 |
commit | aa479138ea236f7f1165c8e81e217e7df72d61d2 (patch) | |
tree | 5495236f923371fd6792b29101d8912e60230415 /clang/lib/AST/StmtPrinter.cpp | |
parent | 0fff397a134b156cb4b9d60472b2d1ebd19cd3cd (diff) | |
download | bcm5719-llvm-aa479138ea236f7f1165c8e81e217e7df72d61d2.tar.gz bcm5719-llvm-aa479138ea236f7f1165c8e81e217e7df72d61d2.zip |
Add new 'CXXConditionDeclExpr' expression node used for a 'condition' declaration, e.g: "if (int x=0) {...}".
It is a subclass of DeclRefExpr and the main difference is that CXXConditionDeclExpr owns the declaration that it references.
llvm-svn: 56033
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index f5806ea5dda..3c3e207a02d 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -829,6 +829,11 @@ void StmtPrinter::VisitCXXZeroInitValueExpr(CXXZeroInitValueExpr *Node) { OS << Node->getType().getAsString() << "()"; } +void +StmtPrinter::VisitCXXConditionDeclExpr(CXXConditionDeclExpr *E) { + PrintRawDecl(E->getVarDecl()); +} + // Obj-C void StmtPrinter::VisitObjCStringLiteral(ObjCStringLiteral *Node) { |