diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2018-08-01 15:32:56 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2018-08-01 15:32:56 +0000 |
commit | f16a6fa8f3191afed71d7b7251af70391c8dc4fd (patch) | |
tree | 6f6bfc2dae23f1c263740c02c246a5d52a4ef899 /llvm/tools/llvm-objcopy/llvm-objcopy.cpp | |
parent | e0fcc68a32172cc572607d63fd2928818ceda7da (diff) | |
download | llvm-f16a6fa8f3191afed71d7b7251af70391c8dc4fd.zip llvm-f16a6fa8f3191afed71d7b7251af70391c8dc4fd.tar.gz llvm-f16a6fa8f3191afed71d7b7251af70391c8dc4fd.tar.bz2 |
[Format] Fix for bug 35641
Summary:
Bug was caused due to comments at the start of scope. For a code like:
```
int func() { //
int b;
int c;
}
```
the comment at the first line gets IndentAndNestingLevel (1,1) whereas
the following declarations get only (0,1) which prevents them from insertion
of a new scope. So, I changed the AlignTokenSequence to look at previous
*non-comment* token when deciding whether to introduce a new scope into
stack or not.
Patch by Kadir Cetinkaya!
Reviewers: rsmith, djasper
Reviewed By: djasper
Subscribers: lebedev.ri, cfe-commits, klimek
Tags: #clang
Differential Revision: https://reviews.llvm.org/D43303
llvm-svn: 338578
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
0 files changed, 0 insertions, 0 deletions