diff options
author | Marianne Mailhot-Sarrasin <marianne.mailhot.sarrasin@gmail.com> | 2016-04-14 14:52:26 +0000 |
---|---|---|
committer | Marianne Mailhot-Sarrasin <marianne.mailhot.sarrasin@gmail.com> | 2016-04-14 14:52:26 +0000 |
commit | 51fe279fbbae990318bcedd6d0990dbc2ae00583 (patch) | |
tree | bb8dc32b42567fc567e19f12a83277f9718fa46f /clang/lib/Format/WhitespaceManager.cpp | |
parent | 4988fa1bc58cbe6e076ab76f2da91215d8d37771 (diff) | |
download | bcm5719-llvm-51fe279fbbae990318bcedd6d0990dbc2ae00583.tar.gz bcm5719-llvm-51fe279fbbae990318bcedd6d0990dbc2ae00583.zip |
clang-format: Implemented tab usage for continuation and indentation
Use tabs to fill whitespace at the start of a line.
Patch by Maxime Beaulieu
Differential Revision: http://reviews.llvm.org/D19028
llvm-svn: 266320
Diffstat (limited to 'clang/lib/Format/WhitespaceManager.cpp')
-rw-r--r-- | clang/lib/Format/WhitespaceManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp index 0673dfb3ace..9cdba9df10a 100644 --- a/clang/lib/Format/WhitespaceManager.cpp +++ b/clang/lib/Format/WhitespaceManager.cpp @@ -558,6 +558,14 @@ void WhitespaceManager::appendIndentText(std::string &Text, } Text.append(Spaces, ' '); break; + case FormatStyle::UT_ForContinuationAndIndentation: + if (WhitespaceStartColumn == 0) { + unsigned Tabs = Spaces / Style.TabWidth; + Text.append(Tabs, '\t'); + Spaces -= Tabs * Style.TabWidth; + } + Text.append(Spaces, ' '); + break; } } |