diff options
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 10 |
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()))); +} |