summaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2018-08-01 15:32:56 +0000
committerIlya Biryukov <ibiryukov@google.com>2018-08-01 15:32:56 +0000
commitfe1098c84823b8eac46b0bfffc5f5788b6c26d1a (patch)
tree0951b151bb3d53019e3ddf47a52f2ebf0192efa6 /include/clang
parent2f6d0b8d50fbb0638b173d6d9da0dae804c82fb2 (diff)
downloadclang-fe1098c84823b8eac46b0bfffc5f5788b6c26d1a.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
0 files changed, 0 insertions, 0 deletions