summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 4b8f80f3774..c426bed316b 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1862,6 +1862,10 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line,
(Left.TokenText == "throws" || Left.TokenText == "extends" ||
Left.TokenText == "implements"))
return false;
+ if (Right.is(tok::identifier) &&
+ (Right.TokenText == "throws" || Right.TokenText == "extends" ||
+ Right.TokenText == "implements"))
+ return true;
}
if (Left.is(tok::at))
OpenPOWER on IntegriCloud