summaryrefslogtreecommitdiff
path: root/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
commit90a5d4316e41659021607bbca7acfd210ae559f5 (patch)
tree3d3b037f9051728f6fe7a46005117b25f021aad1 /lib/Format/Format.cpp
parent015280a8320e1ce80792b9bd6346a2105c2efd95 (diff)
downloadclang-90a5d4316e41659021607bbca7acfd210ae559f5.tar.gz
clang-90a5d4316e41659021607bbca7acfd210ae559f5.tar.bz2
clang-90a5d4316e41659021607bbca7acfd210ae559f5.tar.xz
Fix the regression caused by r196378
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 156ff6429c..26a320b05a 100644
--- a/lib/Format/Format.cpp
+++ b/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;