]> granicus.if.org Git - clang/commitdiff
Remove ElseScope which is also dead code now.
authorNick Lewycky <nicholas@mxc.ca>
Fri, 6 Aug 2010 06:50:17 +0000 (06:50 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 6 Aug 2010 06:50:17 +0000 (06:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110433 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Parse/Scope.h
lib/Parse/ParseStmt.cpp

index 023f40d3957c8968800014f1b1c96a2beff9e07e..f4f0cb72066aeedf835963ec3e8e9397642efb89 100644 (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
index baf8488e74106fb3cdebb6e691b06be832cd1cd3..1136be006ffe4e985ec8256ca2577a68ce6d029c 100644 (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();