================
Comment at: lib/Format/WhitespaceManager.cpp:276
@@ -270,1 +275,3 @@
+  case FormatStyle::UT_Never:
     Text.append(std::string(Spaces, ' '));
+    break;
----------------
Why's that not IndentLevel * Style.IndentWidth + Spaces?

================
Comment at: lib/Format/WhitespaceManager.cpp:279-287
@@ -272,9 +278,11 @@
+  case FormatStyle::UT_Always: {
     unsigned FirstTabWidth =
         Style.TabWidth - WhitespaceStartColumn % Style.TabWidth;
     // Indent with tabs only when there's at least one full tab.
     if (FirstTabWidth + Style.TabWidth <= Spaces) {
       Spaces -= FirstTabWidth;
       Text.append("\t");
     }
     Text.append(std::string(Spaces / Style.TabWidth, '\t'));
     Text.append(std::string(Spaces % Style.TabWidth, ' '));
+    break;
----------------
Same here...

================
Comment at: lib/Format/WhitespaceManager.cpp:291
@@ +290,3 @@
+  case FormatStyle::UT_ForIndentation:
+    if (WhitespaceStartColumn == 0) {
+      unsigned Indentation = IndentLevel * Style.IndentWidth;
----------------
I'd rather use IndentLevel == 0 to decide that case, but I can see that both 
are not ideal...


http://llvm-reviews.chandlerc.com/D1770
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to