[PATCH] D48259: [clang-format] Fix bug with UT_Always when there is less than one full tab

2018-06-16 Thread Guillaume Reymond via Phabricator via cfe-commits
guigu created this revision. guigu added reviewers: klimek, djasper. guigu added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. There's a bug in the `WhitespaceManager` that prevents correct alignment when using tab. This patch fix a test condition t

[PATCH] D48259: [clang-format] Fix bug with UT_Always when there is less than one full tab

2018-06-17 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:678 // Indent with tabs only when there's at least one full tab. -if (FirstTabWidth + Style.TabWidth <= Spaces) { +if (Style.TabWidth <= Spaces) { Spaces -= FirstTabWidth; -

[PATCH] D48259: [clang-format] Fix bug with UT_Always when there is less than one full tab

2018-06-19 Thread Guillaume Reymond via Phabricator via cfe-commits
guigu added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:678 // Indent with tabs only when there's at least one full tab. -if (FirstTabWidth + Style.TabWidth <= Spaces) { +if (Style.TabWidth <= Spaces) { Spaces -= FirstTabWidth; --

[PATCH] D48259: [clang-format] Fix bug with UT_Always when there is less than one full tab

2018-06-21 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:678 // Indent with tabs only when there's at least one full tab. -if (FirstTabWidth + Style.TabWidth <= Spaces) { +if (Style.TabWidth <= Spaces) { Spaces -= FirstTabWidth; -

[PATCH] D48259: [clang-format] Fix bug with UT_Always when there is less than one full tab

2019-03-03 Thread Guillaume Reymond via Phabricator via cfe-commits
guigu abandoned this revision. guigu added a comment. Herald added a project: clang. Forgot about this one. While merging, noticed that it's fixed by https://reviews.llvm.org/D57655. The integrated fix is better as it handle the unlikely but possible tabwidth of 1. Closing. Repo