summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-07-06 22:32:59 +0000
committerNico Weber <nicolasweber@gmx.de>2014-07-06 22:32:59 +0000
commitc7d0596429b6051c212a5ae1864c8635ab8ae906 (patch)
tree4014ce3b9ed73237d15942a74db344d46214d69c /clang/lib/Parse/ParseStmt.cpp
parent97255a017b5d8014439056669f0b148ec249ba92 (diff)
downloadbcm5719-llvm-c7d0596429b6051c212a5ae1864c8635ab8ae906.tar.gz
bcm5719-llvm-c7d0596429b6051c212a5ae1864c8635ab8ae906.zip
Add parser support for __leave (sema and onward still missing).
llvm-svn: 212421
Diffstat (limited to 'clang/lib/Parse/ParseStmt.cpp')
-rw-r--r--clang/lib/Parse/ParseStmt.cpp15
1 files changed, 15 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:
OpenPOWER on IntegriCloud