[PATCH] Correctly calculate OriginalColumn after multi-line tokens.
Daniel Jasper
djasper at google.com
Tue Sep 10 05:22:59 PDT 2013
Nice.
================
Comment at: lib/Format/ContinuationIndenter.cpp:633
@@ -633,1 +632,3 @@
bool DryRun) {
+ if (Current.Type != TT_BlockComment && Current.IsMultiline) {
+ // Don't break multi-line tokens other than block comments.
----------------
nit: LLVM-style generally avoids braces around one-statement ifs.
================
Comment at: lib/Format/Format.cpp:708
@@ -698,3 +707,3 @@
// Thus, the length can be precomputed even in the presence of tabs.
- FormatTok->LastLineColumnWidth = encoding::columnWidthWithTabs(
+ Column = FormatTok->LastLineColumnWidth = encoding::columnWidthWithTabs(
Text.substr(Text.find_last_of('\n') + 1), 0, Style.TabWidth,
----------------
nit: Can you please make this two statements (makes it slightly clearer for me personally)?
http://llvm-reviews.chandlerc.com/D1638
BRANCH
svn
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list