]> granicus.if.org Git - clang/commitdiff
Fix the regression caused by r196378
authorAlexander Kornienko <alexfh@google.com>
Wed, 4 Dec 2013 13:25:26 +0000 (13:25 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 4 Dec 2013 13:25:26 +0000 (13:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196380 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/Format.cpp

index 156ff6429c003c28f32165f1a4a4bf2c14e212c3..26a320b05a0686cbdc0003407e82ceff7091eba3 100644 (file)
@@ -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;