Correctly indent with tabs when whitespace starts from the column not divisible by TabWidth.
Summary:
The width of the first inserted tab character depends on the initial
column, so we need to handle the first tab in a special manner.
Reviewers: klimek, djasper
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1763
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191497 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/WhitespaceManager.h b/lib/Format/WhitespaceManager.h
index 2c58216..642b5b6 100644
--- a/lib/Format/WhitespaceManager.h
+++ b/lib/Format/WhitespaceManager.h
@@ -157,7 +157,8 @@
void appendNewlineText(std::string &Text, unsigned Newlines,
unsigned PreviousEndOfTokenColumn,
unsigned EscapedNewlineColumn);
- void appendIndentText(std::string &Text, unsigned Spaces);
+ void appendIndentText(std::string &Text, unsigned Spaces,
+ unsigned WhitespaceStartColumn);
SmallVector<Change, 16> Changes;
SourceManager &SourceMgr;