diff options
author | Daniel Jasper <djasper@google.com> | 2014-02-14 18:22:40 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-02-14 18:22:40 +0000 |
commit | 3a122c029dfe98de32cb7f1b8f0cbcaa1504eefa (patch) | |
tree | 18b69804c9e5ffeb73e397ceaa1b47f339a6355f /clang/lib/Format/TokenAnnotator.cpp | |
parent | f6830f47b84a2048a78fafa0051ff823de449c18 (diff) | |
download | bcm5719-llvm-3a122c029dfe98de32cb7f1b8f0cbcaa1504eefa.tar.gz bcm5719-llvm-3a122c029dfe98de32cb7f1b8f0cbcaa1504eefa.zip |
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)> {};
llvm-svn: 201424
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 6891930ead3..2275557fda4 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/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; |