Fix bug discovered with address sanitizer.

Now, this works again with an empty stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Jasper 2013-04-04 19:31:00 +00:00
Родитель 740991bdf8
Коммит abfc9c160a
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -927,11 +927,11 @@ private:
} }
// Remove scopes created by fake parenthesis. // Remove scopes created by fake parenthesis.
unsigned VariablePos = State.Stack.back().VariablePos;
for (unsigned i = 0, e = Current.FakeRParens; i != e; ++i) { for (unsigned i = 0, e = Current.FakeRParens; i != e; ++i) {
unsigned VariablePos = State.Stack.back().VariablePos;
State.Stack.pop_back(); State.Stack.pop_back();
State.Stack.back().VariablePos = VariablePos;
} }
State.Stack.back().VariablePos = VariablePos;
if (Current.is(tok::string_literal)) { if (Current.is(tok::string_literal)) {
State.StartOfStringLiteral = State.Column; State.StartOfStringLiteral = State.Column;