diff options
| author | Manuel Klimek <klimek@google.com> | 2014-03-18 11:22:45 +0000 |
|---|---|---|
| committer | Manuel Klimek <klimek@google.com> | 2014-03-18 11:22:45 +0000 |
| commit | c99e001486959e6b7e3a49475bd64348504e0384 (patch) | |
| tree | 445ec50ff667e3742a22efee8eb173f79bd1394d /lib/CodeGen/CodeGenFunction.cpp | |
| parent | e26232b0a40e4a3ae5ed331cc862faf3a50b17d3 (diff) | |
| download | clang-c99e001486959e6b7e3a49475bd64348504e0384.tar.gz clang-c99e001486959e6b7e3a49475bd64348504e0384.tar.bz2 clang-c99e001486959e6b7e3a49475bd64348504e0384.tar.xz | |
Fix crasher bug.
Due to not resetting the fake rparen data on the token when iterating
over annotated lines, we would pop the last element of the paren stack.
This patch fixes the underlying root cause, and makes the code more
robust against similar problems in the future:
- reset the first token when iterating on the same annotated lines due
to preprocessor branches
- never pop the last element from the paren stack, so we do not crash,
but rather incorrectly format
- add assert()s so we can figure out if our assumptions are violated
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
