diff options
author | Steve Naroff <snaroff@apple.com> | 2007-07-19 21:32:11 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2007-07-19 21:32:11 +0000 |
commit | 57eb2c5f58628f0a40a95b4ea383bdbe5bc33ad0 (patch) | |
tree | 3fe906b9f9d6604987af3d97d1e7c820a8d5920b /clang/AST/StmtPrinter.cpp | |
parent | 68ee4e8efc466e8346ae755724e0ff8082c6bc37 (diff) | |
download | bcm5719-llvm-57eb2c5f58628f0a40a95b4ea383bdbe5bc33ad0.tar.gz bcm5719-llvm-57eb2c5f58628f0a40a95b4ea383bdbe5bc33ad0.zip |
Finish fixing crasher with compound literals.
We still need to do sematic analysis (and implement initializers), however this
should complete the parsing & ast building for compound literals.
llvm-svn: 40067
Diffstat (limited to 'clang/AST/StmtPrinter.cpp')
-rw-r--r-- | clang/AST/StmtPrinter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/AST/StmtPrinter.cpp b/clang/AST/StmtPrinter.cpp index ef956284619..a3fff024305 100644 --- a/clang/AST/StmtPrinter.cpp +++ b/clang/AST/StmtPrinter.cpp @@ -423,6 +423,10 @@ void StmtPrinter::VisitCastExpr(CastExpr *Node) { OS << "(" << Node->getType().getAsString() << ")"; PrintExpr(Node->getSubExpr()); } +void StmtPrinter::VisitCompoundLiteralExpr(CompoundLiteralExpr *Node) { + OS << "(" << Node->getType().getAsString() << ")"; + PrintExpr(Node->getInitializer()); +} void StmtPrinter::VisitImplicitCastExpr(ImplicitCastExpr *Node) { // No need to print anything, simply forward to the sub expression. PrintExpr(Node->getSubExpr()); |