aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2008-12-22 19:15:10 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2008-12-22 19:15:10 +0000
commit4b07b2968f87f3cd5a3d8c76145f1cbfd718d42d (patch)
treec92a07839c5ff786350b17c99a1d7a68838a17fe /lib/Sema/SemaStmt.cpp
parent804058ece0d8f692faac8518ce4d98975ba57ac2 (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/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 22a9617eb7..6a322ee21c 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -951,3 +951,13 @@ Sema::ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc, ExprTy *SynchExpr,
static_cast<Stmt*>(SynchExpr), static_cast<Stmt*>(SynchBody));
return SS;
}
+
+/// ActOnCXXCatchBlock - Takes an exception declaration and a handler block
+/// and creates a proper catch handler from them.
+Action::OwningStmtResult
+Sema::ActOnCXXCatchBlock(SourceLocation CatchLoc, DeclTy *ExDecl,
+ StmtArg HandlerBlock) {
+ // There's nothing to test that ActOnExceptionDecl didn't already test.
+ return Owned(new CXXCatchStmt(CatchLoc, static_cast<VarDecl*>(ExDecl),
+ static_cast<Stmt*>(HandlerBlock.release())));
+}