diff options
author | Steve Naroff <snaroff@apple.com> | 2009-02-11 20:05:44 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-02-11 20:05:44 +0000 |
commit | e21dd6ffef4585fa43cd3586ed971217d65bf56c (patch) | |
tree | f22e966014b4aa6f98501776285827fc0c441ab0 /lib/Parse/ParseObjc.cpp | |
parent | cc45cb3630b42c5245e26593e385097c220bc859 (diff) |
Fix <rdar://problem/6243503> [sema] @throw; accepted outside catch block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index f45562644f..338e770cd6 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -1202,7 +1202,7 @@ Parser::OwningStmtResult Parser::ParseObjCThrowStmt(SourceLocation atLoc) { } } ConsumeToken(); // consume ';' - return Actions.ActOnObjCAtThrowStmt(atLoc, move(Res)); + return Actions.ActOnObjCAtThrowStmt(atLoc, move(Res), CurScope); } /// objc-synchronized-statement: @@ -1284,7 +1284,7 @@ Parser::OwningStmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) { ConsumeToken(); // consume catch if (Tok.is(tok::l_paren)) { ConsumeParen(); - ParseScope CatchScope(this, Scope::DeclScope); + ParseScope CatchScope(this, Scope::DeclScope|Scope::AtCatchScope); if (Tok.isNot(tok::ellipsis)) { DeclSpec DS; ParseDeclarationSpecifiers(DS); |