[cfe-commits] r110433 - in /cfe/trunk: include/clang/Parse/Scope.h lib/Parse/ParseStmt.cpp
Nick Lewycky
nicholas at mxc.ca
Thu Aug 5 23:50:17 PDT 2010
Author: nicholas
Date: Fri Aug 6 01:50:17 2010
New Revision: 110433
URL: http://llvm.org/viewvc/llvm-project?rev=110433&view=rev
Log:
Remove ElseScope which is also dead code now.
Modified:
cfe/trunk/include/clang/Parse/Scope.h
cfe/trunk/lib/Parse/ParseStmt.cpp
Modified: cfe/trunk/include/clang/Parse/Scope.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Scope.h?rev=110433&r1=110432&r2=110433&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Scope.h (original)
+++ cfe/trunk/include/clang/Parse/Scope.h Fri Aug 6 01:50:17 2010
@@ -72,11 +72,7 @@
/// 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
Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=110433&r1=110432&r2=110433&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Fri Aug 6 01:50:17 2010
@@ -667,13 +667,7 @@
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();
More information about the cfe-commits
mailing list