Hi,
Trailing comments are not always aligned properly when UseTab is set to Always.
Consider:
int a; // x int bbbbbbbb; // 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.
That is incorrect.