summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-02-25 01:43:27 +0000
committerNico Weber <nicolasweber@gmx.de>2015-02-25 01:43:27 +0000
commitdd25674a40293b2908fccf023cb6994fd80aedf0 (patch)
treed78d6586773d5c3dc3205c30b4cd9205495ce0ac /clang
parenta54860e0583ef24cfd91d5ba8c79fd5b4381c68a (diff)
downloadbcm5719-llvm-dd25674a40293b2908fccf023cb6994fd80aedf0.tar.gz
bcm5719-llvm-dd25674a40293b2908fccf023cb6994fd80aedf0.zip
Fold ParseSEHTryBlockCommon() into its only caller. No behavior change.
ParseCXXTryBlockCommon() makes sense because it has two callers due to function try blocks. There are no SEH function try blocks. llvm-svn: 230426
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Parse/Parser.h1
-rw-r--r--clang/lib/Parse/ParseStmt.cpp11
2 files changed, 4 insertions, 8 deletions
diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h
index fd120aef294..bb23b74a4b2 100644
--- a/clang/include/clang/Parse/Parser.h
+++ b/clang/include/clang/Parse/Parser.h
@@ -1658,7 +1658,6 @@ private:
// MS: SEH Statements and Blocks
StmtResult ParseSEHTryBlock();
- StmtResult ParseSEHTryBlockCommon(SourceLocation Loc);
StmtResult ParseSEHExceptBlock(SourceLocation Loc);
StmtResult ParseSEHFinallyBlock(SourceLocation Loc);
StmtResult ParseSEHLeaveStatement();
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index c55dbea7d9e..3b878e8ab18 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -408,12 +408,6 @@ StmtResult Parser::ParseExprStatement() {
return Actions.ActOnExprStmt(Expr);
}
-StmtResult Parser::ParseSEHTryBlock() {
- assert(Tok.is(tok::kw___try) && "Expected '__try'");
- SourceLocation Loc = ConsumeToken();
- return ParseSEHTryBlockCommon(Loc);
-}
-
/// ParseSEHTryBlockCommon
///
/// seh-try-block:
@@ -423,7 +417,10 @@ StmtResult Parser::ParseSEHTryBlock() {
/// seh-except-block
/// seh-finally-block
///
-StmtResult Parser::ParseSEHTryBlockCommon(SourceLocation TryLoc) {
+StmtResult Parser::ParseSEHTryBlock() {
+ assert(Tok.is(tok::kw___try) && "Expected '__try'");
+ SourceLocation TryLoc = ConsumeToken();
+
if(Tok.isNot(tok::l_brace))
return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace);
OpenPOWER on IntegriCloud