diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Parse/ParseStmt.cpp | 15 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaStmt.cpp | 5 |
2 files changed, 20 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index f27634cb2ae..e81945437bf 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/lib/Parse/ParseStmt.cpp @@ -288,6 +288,11 @@ Retry: ProhibitAttributes(Attrs); // TODO: is it correct? return ParseSEHTryBlock(); + case tok::kw___leave: + Res = ParseSEHLeaveStatement(); + SemiError = "__leave"; + break; + case tok::annot_pragma_vis: ProhibitAttributes(Attrs); HandlePragmaVisibility(); @@ -506,6 +511,16 @@ StmtResult Parser::ParseSEHFinallyBlock(SourceLocation FinallyBlock) { return Actions.ActOnSEHFinallyBlock(FinallyBlock,Block.get()); } +/// Handle __leave +/// +/// seh-leave-statement: +/// '__leave' ';' +/// +StmtResult Parser::ParseSEHLeaveStatement() { + SourceLocation LeaveLoc = ConsumeToken(); // eat the '__leave'. + return Actions.ActOnSEHLeaveStmt(LeaveLoc, getCurScope()); +} + /// ParseLabeledStatement - We have an identifier and a ':' after it. /// /// labeled-statement: diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index dc1cddc59f5..6090d6d14d4 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -3277,6 +3277,11 @@ Sema::ActOnSEHFinallyBlock(SourceLocation Loc, return SEHFinallyStmt::Create(Context,Loc,Block); } +StmtResult +Sema::ActOnSEHLeaveStmt(SourceLocation Loc, Scope *CurScope) { + return StmtError(Diag(Loc, diag::err_ms___leave_unimplemented)); +} + StmtResult Sema::BuildMSDependentExistsStmt(SourceLocation KeywordLoc, bool IsIfExists, NestedNameSpecifierLoc QualifierLoc, |

