summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-12-04 13:25:26 +0000
committerAlexander Kornienko <alexfh@google.com>2013-12-04 13:25:26 +0000
commitecc232d521ad8a433ca0422acae16af87136a169 (patch)
treeff13204bd571087559647497388d1ac41b6b08ad /clang/lib/Format/Format.cpp
parentb8c367b49d700461d2d6b3b806ec7a864bb02391 (diff)
downloadbcm5719-llvm-ecc232d521ad8a433ca0422acae16af87136a169.tar.gz
bcm5719-llvm-ecc232d521ad8a433ca0422acae16af87136a169.zip
Fix the regression caused by r196378
llvm-svn: 196380
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 156ff6429c0..26a320b05a0 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -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;
OpenPOWER on IntegriCloud