aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 3c337ec063..6fb75a657a 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -941,7 +941,10 @@ private:
}
bool canBreakBefore(unsigned i) {
+ if (Annotations[i - 1].ClosesTemplateDeclaration)
+ return true;
if (Annotations[i - 1].Type == TokenAnnotation::TT_PointerOrReference ||
+ Annotations[i - 1].Type == TokenAnnotation::TT_TemplateCloser ||
Annotations[i].Type == TokenAnnotation::TT_ConditionalExpr) {
return false;
}