diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2008-12-22 19:15:10 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2008-12-22 19:15:10 +0000 |
commit | 4b07b2968f87f3cd5a3d8c76145f1cbfd718d42d (patch) | |
tree | c92a07839c5ff786350b17c99a1d7a68838a17fe /lib/AST/StmtPrinter.cpp | |
parent | 804058ece0d8f692faac8518ce4d98975ba57ac2 (diff) |
Partial AST and Sema support for C++ try-catch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtPrinter.cpp')
-rw-r--r-- | lib/AST/StmtPrinter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp index 81e158e657..61cd89f70f 100644 --- a/lib/AST/StmtPrinter.cpp +++ b/lib/AST/StmtPrinter.cpp @@ -474,6 +474,17 @@ void StmtPrinter::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *Node) { OS << "\n"; } +void StmtPrinter::VisitCXXCatchStmt(CXXCatchStmt *Node) { + Indent() << "catch ("; + if (Decl *ExDecl = Node->getExceptionDecl()) + PrintRawDecl(ExDecl); + else + OS << "..."; + OS << ") "; + PrintRawCompoundStmt(cast<CompoundStmt>(Node->getHandlerBlock())); + OS << "\n"; +} + //===----------------------------------------------------------------------===// // Expr printing methods. //===----------------------------------------------------------------------===// |