diff options
| author | Daniel Jasper <djasper@google.com> | 2013-04-04 19:31:00 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2013-04-04 19:31:00 +0000 |
| commit | 6daabe371623dd010886dc1c3bb9d8ed1b5b3a6d (patch) | |
| tree | 45b7e3c3b5c0a79d1b01ef77e4b86467066c0e3e /clang/lib | |
| parent | be7b005d839a7042f7aa9d71a2014ac31ca41a98 (diff) | |
| download | bcm5719-llvm-6daabe371623dd010886dc1c3bb9d8ed1b5b3a6d.tar.gz bcm5719-llvm-6daabe371623dd010886dc1c3bb9d8ed1b5b3a6d.zip | |
Fix bug discovered with address sanitizer.
Now, this works again with an empty stack.
llvm-svn: 178779
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Format/Format.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 1e0178e14e2..d6aa6a9b7ea 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -927,11 +927,11 @@ private: } // Remove scopes created by fake parenthesis. - unsigned VariablePos = State.Stack.back().VariablePos; for (unsigned i = 0, e = Current.FakeRParens; i != e; ++i) { + unsigned VariablePos = State.Stack.back().VariablePos; State.Stack.pop_back(); + State.Stack.back().VariablePos = VariablePos; } - State.Stack.back().VariablePos = VariablePos; if (Current.is(tok::string_literal)) { State.StartOfStringLiteral = State.Column; |

