summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index ba08ace1e8b..9adec611f28 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1817,6 +1817,8 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line,
return false;
if (Left.Tok.getObjCKeywordID() == tok::objc_interface)
return false;
+ if (Left.Type == TT_JavaAnnotation)
+ return true;
if (Right.Type == TT_StartOfName ||
Right.Type == TT_FunctionDeclarationName || Right.is(tok::kw_operator))
return true;
OpenPOWER on IntegriCloud