Descriptionclang-format/java: Allow one-line empty functions.
Before:
void f() {
}
int g() {
return 0;
}
Now:
void f() {}
int g() {
return 0;
}
Do this by removing the explicit setting for AllowShortFunctionsOnSingleLine,
as of recently [1] it defaults to "Empty" for Java, a new setting that does
what we want.
Chromium style used to unconditionally override AllowShortFunctionsOnSingleLine
to the wrong thing, so I taught clang-format to not do that for Java files, and
while there also made -style=Chromium do the right thing for most of the
settings [2], so remove most explicit settings from this file. Except for
AllowShortFunctionsOnSingleLine, this doesn't change behavior.
1: http://llvm.org/viewvc/llvm-project?view=revision&revision=222819
2: http://llvm.org/viewvc/llvm-project?view=revision&revision=222839
BUG=429372
NOTRY=true
Committed: https://crrev.com/f714c2a03b058bf83fe6d86816dcdcd0a5b212e0
Cr-Commit-Position: refs/heads/master@{#305830}
Patch Set 1 #
Messages
Total messages: 7 (2 generated)
|