Skip to content
Commit f16a6fa8 authored by Ilya Biryukov's avatar Ilya Biryukov
Browse files

[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
parent e0fcc68a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment