diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 7cc3029aae..6456ee8d9a 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -2935,11 +2935,11 @@ void Sema::RecursiveCalcLabelScopes(llvm::DenseMap<Stmt*, void*>& LabelScopeMap, Stmt* CurCompound = isa<CompoundStmt>(*i) ? *i : ParentCompoundStmt; RecursiveCalcLabelScopes(LabelScopeMap, PopScopeMap, ScopeStack, *i, CurCompound); + while (ScopeStack.size() && PopScopeMap[ScopeStack.back()] == CurStmt) { + ScopeStack.pop_back(); + } } - while (ScopeStack.size() && PopScopeMap[ScopeStack.back()] == CurStmt) { - ScopeStack.pop_back(); - } } void Sema::RecursiveCalcJumpScopes(llvm::DenseMap<Stmt*, void*>& LabelScopeMap, @@ -2970,10 +2970,9 @@ void Sema::RecursiveCalcJumpScopes(llvm::DenseMap<Stmt*, void*>& LabelScopeMap, if (isa<DeclStmt>(*i)) continue; RecursiveCalcJumpScopes(LabelScopeMap, PopScopeMap, GotoScopeMap, ScopeStack, *i); - } - - while (ScopeStack.size() && PopScopeMap[ScopeStack.back()] == CurStmt) { - ScopeStack.pop_back(); + while (ScopeStack.size() && PopScopeMap[ScopeStack.back()] == CurStmt) { + ScopeStack.pop_back(); + } } } |