Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clang-format with UseTab: Always sometimes doesn't insert the right a…
…mount of tabs. Trailing comments are not always aligned properly when UseTab is set to Always. Consider: int a; // x int bbbbbbb; // x With .clang-format: --- Language: Cpp BasedOnStyle: LLVM UseTab: Always ... The trailing comments of this code block should be aligned, but aren't To align the first trailing comment it needs to insert 8 spaces. This should be one tab plus six spaces. It skips the logic of the first partial tab in FirstTabWidth (=2) + Style.TabWidth (=8) <= Spaces (=8) and only inserts one tab. Proposed fix and test is attached. Patch by Hylke Kleve. Differential revision: https://reviews.llvm.org/D57655 llvm-svn: 354183
- Loading branch information