r230426 - Fold ParseSEHTryBlockCommon() into its only caller. No behavior change.
Nico Weber
nicolasweber at gmx.de
Tue Feb 24 17:43:27 PST 2015
Author: nico
Date: Tue Feb 24 19:43:27 2015
New Revision: 230426
URL: http://llvm.org/viewvc/llvm-project?rev=230426&view=rev
Log:
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.
Modified:
cfe/trunk/include/clang/Parse/Parser.h
cfe/trunk/lib/Parse/ParseStmt.cpp
Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=230426&r1=230425&r2=230426&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Tue Feb 24 19:43:27 2015
@@ -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();
Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=230426&r1=230425&r2=230426&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Tue Feb 24 19:43:27 2015
@@ -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);
More information about the cfe-commits
mailing list