diff options
Diffstat (limited to 'lib/Sema/Scope.cpp')
-rw-r--r-- | lib/Sema/Scope.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/Sema/Scope.cpp b/lib/Sema/Scope.cpp index 8c2a8b3773..10f12ce844 100644 --- a/lib/Sema/Scope.cpp +++ b/lib/Sema/Scope.cpp @@ -69,40 +69,3 @@ bool Scope::containedInPrototypeScope() const { } return false; } - -void Scope::SetFlags(unsigned FlagsToSet) { - assert((FlagsToSet & ~(BreakScope | ContinueScope)) == 0 || - "Unsupported scope flags"); - assert ((Flags & ControlScope) != 0 || "Must be control scope"); - if (FlagsToSet & BreakScope) { - assert((Flags & BreakScope) == 0 || "Already set"); - BreakParent = this; - } - if (FlagsToSet & ContinueScope) { - assert((Flags & ContinueScope) == 0 || "Already set"); - ContinueParent = this; - } - Flags |= FlagsToSet; -} - -void Scope::ClearFlags(unsigned FlagsToClear) { - assert((FlagsToClear & ~(BreakScope | ContinueScope)) == 0 || - "Unsupported scope flags"); - if (FlagsToClear & BreakScope) { - assert((Flags & ControlScope) != 0 || "Must be control scope"); - assert((Flags & BreakScope) != 0 || "Already cleared"); - // This is a loop or switch scope. Flag BreakScope is removed temporarily - // when parsing the loop or switch header, to prevent constructs like this: - // \code - // while (({ if(a>N) break; a})) - // \endcode - BreakParent = 0; - } - if (FlagsToClear & ContinueScope) { - assert ((Flags & ControlScope) != 0 || "Must be control scope"); - assert((Flags & ContinueScope) != 0 || "Already cleared"); - ContinueParent = 0; - } - Flags &= ~FlagsToClear; -} - |