diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-11-13 18:51:45 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-11-13 18:51:45 +0000 |
commit | e5afdcfd6a80efc20b0a2e5bde806c08c3bda887 (patch) | |
tree | d306c98e1f27bd5dd3f57ff1be15ea0e72bb5f9e /lib/Parse/ParseStmt.cpp | |
parent | b55c67d5e3b44499fa92ac3a6eea2ce01ea78234 (diff) |
Simplify function try/catch scope handling.
Based on post-commit review feedback for r167766 by Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167856 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r-- | lib/Parse/ParseStmt.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp index 5883115850..a4e0c9844a 100644 --- a/lib/Parse/ParseStmt.cpp +++ b/lib/Parse/ParseStmt.cpp @@ -2123,8 +2123,8 @@ StmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc, bool FnTry) { // FIXME: Possible draft standard bug: attribute-specifier should be allowed? StmtResult TryBlock(ParseCompoundStatement(/*isStmtExpr=*/false, - Scope::DeclScope | - (FnTry ? Scope::FnTryScope : Scope::TryScope))); + Scope::DeclScope | Scope::TryScope | + (FnTry ? Scope::FnTryCatchScope : 0))); if (TryBlock.isInvalid()) return TryBlock; @@ -2197,7 +2197,7 @@ StmtResult Parser::ParseCXXCatchBlock(bool FnCatch) { // The name in a catch exception-declaration is local to the handler and // shall not be redeclared in the outermost block of the handler. ParseScope CatchScope(this, Scope::DeclScope | Scope::ControlScope | - (FnCatch ? Scope::FnCatchScope : Scope::CatchScope)); + (FnCatch ? Scope::FnTryCatchScope : 0)); // exception-declaration is equivalent to '...' or a parameter-declaration // without default arguments. |