diff options
author | Daniel Jasper <djasper@google.com> | 2014-11-27 14:40:48 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-11-27 14:40:48 +0000 |
commit | e89a0fd73e9b3733f97d89e9ca397b519f149ea8 (patch) | |
tree | 6d9f765de87feee99d559ec44d515b8513b5601c /lib/Format/FormatToken.cpp | |
parent | a379fcb01c6a0a0be996e0fe156de107d70e9927 (diff) |
clang-format: Don't use column layout with AlignAfterOpenBrackets.
This fixes llvm.org/PR21676.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/FormatToken.cpp')
-rw-r--r-- | lib/Format/FormatToken.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Format/FormatToken.cpp b/lib/Format/FormatToken.cpp index 677f1a0bb1..badb3a39c8 100644 --- a/lib/Format/FormatToken.cpp +++ b/lib/Format/FormatToken.cpp @@ -138,6 +138,10 @@ void CommaSeparatedList::precomputeFormattingInfos(const FormatToken *Token) { Commas.size() < 19) return; + // Column format doesn't really make sense if we don't align after brackets. + if (!Style.AlignAfterOpenBracket) + return; + FormatToken *ItemBegin = Token->Next; SmallVector<bool, 8> MustBreakBeforeItem; |