r196380 - Fix the regression caused by r196378

Alexander Kornienko alexfh at google.com
Wed Dec 4 05:25:26 PST 2013


Author: alexfh
Date: Wed Dec  4 07:25:26 2013
New Revision: 196380

URL: http://llvm.org/viewvc/llvm-project?rev=196380&view=rev
Log:
Fix the regression caused by r196378

Modified:
    cfe/trunk/lib/Format/Format.cpp

Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=196380&r1=196379&r2=196380&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Wed Dec  4 07:25:26 2013
@@ -469,6 +469,9 @@ public:
     if (TheLine->Last->Type == TT_LineComment)
       return 0;
 
+    if (Style.ColumnLimit > 0 && Indent > Style.ColumnLimit)
+      return 0;
+
     unsigned Limit =
         Style.ColumnLimit == 0 ? UINT_MAX : Style.ColumnLimit - Indent;
     // If we already exceed the column limit, we set 'Limit' to 0. The different
@@ -477,9 +480,6 @@ public:
                 ? 0
                 : Limit - TheLine->Last->TotalLength;
 
-    if (Indent > Limit)
-      return 0;
-
     if (I + 1 == E || I[1]->Type == LT_Invalid)
       return 0;
 





More information about the cfe-commits mailing list