From be7c9ec198dcdb5bf73a35bfbb00b3333cb87909 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 22 Dec 2012 15:00:54 +0000 Subject: Vendor import of clang tags/RELEASE_32/final r170710 (effectively, 3.2 release): http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final@170710 --- lib/Parse/ParseDeclCXX.cpp | 3 +-- lib/Parse/ParseStmt.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/Parse') diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 4cb14e24f48f..f11a9d199572 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -706,8 +706,7 @@ SourceLocation Parser::ParseDecltypeSpecifier(DeclSpec &DS) { if (SkipUntil(tok::r_paren, /*StopAtSemi=*/true, /*DontConsume=*/true)) { EndLoc = ConsumeParen(); } else { - assert(Tok.is(tok::semi)); - if (PP.isBacktrackEnabled()) { + if (PP.isBacktrackEnabled() && Tok.is(tok::semi)) { // Backtrack to get the location of the last token before the semi. PP.RevertCachedTokens(2); ConsumeToken(); // the semi. diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp index f604e038d2ad..588311585020 100644 --- a/lib/Parse/ParseStmt.cpp +++ b/lib/Parse/ParseStmt.cpp @@ -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 : 0)); + (FnCatch ? Scope::FnCatchScope : Scope::CatchScope)); // exception-declaration is equivalent to '...' or a parameter-declaration // without default arguments. -- cgit v1.3