forked from OSchip/llvm-project
clang-format: [Java] Remove unnecessary line break after complex annotations
Before: @Annotation("Some" + " text") List<Integer> list; After: @Annotation("Some" + " text") List<Integer> list; llvm-svn: 258981
This commit is contained in:
parent
d36f7d5a9a
commit
15b01116d9
|
@ -151,6 +151,7 @@ bool ContinuationIndenter::mustBreak(const LineState &State) {
|
|||
return true;
|
||||
if ((startsNextParameter(Current, Style) || Previous.is(tok::semi) ||
|
||||
(Previous.is(TT_TemplateCloser) && Current.is(TT_StartOfName) &&
|
||||
Style.Language == FormatStyle::LK_Cpp &&
|
||||
// FIXME: This is a temporary workaround for the case where clang-format
|
||||
// sets BreakBeforeParameter to avoid bin packing and this creates a
|
||||
// completely unnecessary line break after a template type that isn't
|
||||
|
|
|
@ -312,6 +312,9 @@ TEST_F(FormatTestJava, Annotations) {
|
|||
" String bbbbbbbbbbbbbbb) {}\n"
|
||||
"}",
|
||||
getStyleWithColumns(60));
|
||||
verifyFormat("@Annotation(\"Some\"\n"
|
||||
" + \" text\")\n"
|
||||
"List<Integer> list;");
|
||||
}
|
||||
|
||||
TEST_F(FormatTestJava, Generics) {
|
||||
|
|
Loading…
Reference in New Issue