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 | 3403feb1d0d32e956e3045dfd5072a3d1d9adb88 (patch) | |
tree | ffa31b9fe7e7cd21fc91cfd25a76a7ac8d1afb3a /clang/lib | |
parent | 3946877f8835b50e67d55f6a807e62a1969e0fc3 (diff) | |
download | bcm5719-llvm-3403feb1d0d32e956e3045dfd5072a3d1d9adb88.tar.gz bcm5719-llvm-3403feb1d0d32e956e3045dfd5072a3d1d9adb88.zip |
Simplify function try/catch scope handling.
Based on post-commit review feedback for r167766 by Richard Smith.
llvm-svn: 167856
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Parse/ParseStmt.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index 58831158502..a4e0c9844ac 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/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. |