summaryrefslogtreecommitdiff
path: root/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-04-28 07:34:48 +0000
committerDaniel Jasper <djasper@google.com>2014-04-28 07:34:48 +0000
commit4145db1ccb327a39726edbbb1069d5585aec4d65 (patch)
tree54b09eb61877065ed198a92dffe5e3e1c3061838 /lib/Format/TokenAnnotator.cpp
parentd53fa2e0646e4f1182d4fa47f9934756ba2d8b73 (diff)
downloadclang-4145db1ccb327a39726edbbb1069d5585aec4d65.tar.gz
clang-4145db1ccb327a39726edbbb1069d5585aec4d65.tar.bz2
clang-4145db1ccb327a39726edbbb1069d5585aec4d65.tar.xz
clang-format: Don't wrap after @interface.
This fixes llvm.org/PR19450. Before: @interface BookmarkHomeHandsetViewController ()<BookmarkAllCollectionViewDelegate, BookmarkFolderCollectionViewDelegate, BookmarkMenuViewControllerDelegate, BookmarkSearchViewControllerDelegate> { } After: @interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ()< aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> { } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/TokenAnnotator.cpp')
-rw-r--r--lib/Format/TokenAnnotator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp
index 52764552b0..d2b79e544e 100644
--- a/lib/Format/TokenAnnotator.cpp
+++ b/lib/Format/TokenAnnotator.cpp
@@ -1583,6 +1583,8 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line,
const FormatToken &Left = *Right.Previous;
if (Left.is(tok::at))
return false;
+ if (Left.Tok.getObjCKeywordID() == tok::objc_interface)
+ return false;
if (Right.Type == TT_StartOfName || Right.is(tok::kw_operator))
return true;
if (Right.isTrailingComment())