summaryrefslogtreecommitdiff
path: root/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-02-14 18:22:40 +0000
committerDaniel Jasper <djasper@google.com>2014-02-14 18:22:40 +0000
commitcafca2019fcd2fca5dccef78e2a436e8b1d92da7 (patch)
tree34b89e1f17dea4bd439556e9baf3cf1a08290ced /lib/Format/TokenAnnotator.cpp
parent27203f6279b667044d6d2ec648c5f0392f874893 (diff)
downloadclang-cafca2019fcd2fca5dccef78e2a436e8b1d92da7.tar.gz
clang-cafca2019fcd2fca5dccef78e2a436e8b1d92da7.tar.bz2
clang-cafca2019fcd2fca5dccef78e2a436e8b1d92da7.tar.xz
clang-format: Fix formatting of class template declaration.
Before: template <class R, class C> struct Aaaaaaaaaaaaaaaaa<R (C::*)(int) const> : Aaaaaaaaaaaaaaaaa<R (C::*)(int)> {}; After: template <class R, class C> struct Aaaaaaaaaaaaaaaaa<R (C::*)(int) const> : Aaaaaaaaaaaaaaaaa<R (C::*)(int)> {}; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201424 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 6891930ead..2275557fda 100644
--- a/lib/Format/TokenAnnotator.cpp
+++ b/lib/Format/TokenAnnotator.cpp
@@ -1503,6 +1503,8 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line,
if (Right.is(tok::colon) &&
(Right.Type == TT_DictLiteral || Right.Type == TT_ObjCMethodExpr))
return false;
+ if (Right.Type == TT_InheritanceColon)
+ return true;
if (Left.is(tok::colon) &&
(Left.Type == TT_DictLiteral || Left.Type == TT_ObjCMethodExpr))
return true;