summaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2014-11-26 10:03:15 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-26 18:03:36 +0000
commitf714c2a03b058bf83fe6d86816dcdcd0a5b212e0 (patch)
treeaa9347bb17f222e77b7cc817d44263b5e56d3f50 /.clang-format
parent3b67e81b636e8b8a542120df8dcaa92447aba3a8 (diff)
downloadchromium_src-f714c2a03b058bf83fe6d86816dcdcd0a5b212e0.zip
chromium_src-f714c2a03b058bf83fe6d86816dcdcd0a5b212e0.tar.gz
chromium_src-f714c2a03b058bf83fe6d86816dcdcd0a5b212e0.tar.bz2
clang-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 Review URL: https://codereview.chromium.org/757313002 Cr-Commit-Position: refs/heads/master@{#305830}
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format10
1 files changed, 0 insertions, 10 deletions
diff --git a/.clang-format b/.clang-format
index d969a08..cd49686 100644
--- a/.clang-format
+++ b/.clang-format
@@ -10,14 +10,4 @@ Standard: Cpp11
---
Language: Java
# See http://crbug.com/429372 for information about this section.
-IndentWidth: 4
-ContinuationIndentWidth: 8
-ColumnLimit: 100
-AllowShortBlocksOnASingleLine: false
-AllowShortFunctionsOnASingleLine: None
-AllowShortIfStatementsOnASingleLine: true
-AllowShortLoopsOnASingleLine: true
-BinPackArguments: true
-BinPackParameters: true
-BreakBeforeBinaryOperators: NonAssignment
Cpp11BracedListStyle: false # but see http://llvm.org/PR21457