Remove ElseScope which is also dead code now.

llvm-svn: 110433
This commit is contained in:
Nick Lewycky 2010-08-06 06:50:17 +00:00
parent 60ecc522e0
commit 2667f1d409
2 changed files with 1 additions and 11 deletions

View File

@ -72,11 +72,7 @@ public:
/// ObjCMethodScope - This scope corresponds to an Objective-C method body.
/// It always has FnScope and DeclScope set as well.
ObjCMethodScope = 0x400,
/// ElseScope - This scope corresponds to an 'else' scope of an if/then/else
/// statement.
ElseScope = 0x800
ObjCMethodScope = 0x400
};
private:
/// The parent scope for this scope. This is null for the translation-unit

View File

@ -667,13 +667,7 @@ Parser::OwningStmtResult Parser::ParseIfStatement(AttributeList *Attr) {
ParseScope InnerScope(this, Scope::DeclScope,
C99orCXX && Tok.isNot(tok::l_brace));
// Regardless of whether or not InnerScope actually pushed a scope, set the
// ElseScope flag for the innermost scope so we can diagnose use of the if
// condition variable in C++.
unsigned OldFlags = getCurScope()->getFlags();
getCurScope()->setFlags(OldFlags | Scope::ElseScope);
ElseStmt = ParseStatement();
getCurScope()->setFlags(OldFlags);
// Pop the 'else' scope if needed.
InnerScope.Exit();