summaryrefslogtreecommitdiffstats
path: root/.clang-format
Commit message (Collapse)AuthorAgeFilesLines
* Add more macros to .clang-format's MacroBlock{Begin,End} options.dcheng2015-07-171-2/+8
| | | | | | | | | | | The number of macros is too damn high! BUG=373340 TBR=darin@chromium.org Review URL: https://codereview.chromium.org/1235153009 Cr-Commit-Position: refs/heads/master@{#339216}
* Add IPC and Windows message map macro blocks to .clang-format optionsDaniel Cheng2015-07-161-0/+21
| | | | | | | | | | | | | | Use the new MacroBlockBegin/MacroBlockEnd options introduced in http://reviews.llvm.org/rL241363 so clang-format can correctly indent the bodies of IPC message maps, etc. BUG=373340 R=thakis@chromium.org TBR=darin@chromium.org Review URL: https://codereview.chromium.org/1225333004 . Cr-Commit-Position: refs/heads/master@{#339131}
* clang-format/java: No spaces around braces in initializer lists.thakis2014-12-011-5/+0
| | | | | | | | | | | | | | | | | | | Those spaces are explicitly optional for Google's Java style (Point 8 of https://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.6.2-horizontal-whitespace) and not having spaces outnumbers spaces about 10-to-1 in our existing code. This also removes the space in annotations like `@Feature({"Android-AppBase"})` which is too looks like a good change. With this, all chromium-related java bits are upstreamed into clang-format and the java-specific section from .clang-format is gone again. BUG=429372 NOTRY=true Review URL: https://codereview.chromium.org/764423002 Cr-Commit-Position: refs/heads/master@{#306245}
* clang-format/java: Allow one-line empty functions.thakis2014-11-261-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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}
* clang-format/java: Allow single-line loops.thakis2014-11-251-0/+1
| | | | | | | | | BUG=429372 NOTRY=true Review URL: https://codereview.chromium.org/755313002 Cr-Commit-Position: refs/heads/master@{#305657}
* clang-format/java: Do not use "all params on one line, or one line per ↵thakis2014-11-191-0/+2
| | | | | | | | | | | param" for Java. BUG=429372 NOTRY=true Review URL: https://codereview.chromium.org/724613004 Cr-Commit-Position: refs/heads/master@{#304923}
* clang-format/java: break before operators, except for =Nico Weber2014-11-141-0/+1
| | | | | | | | | BUG=429372 R=aurimas@chromium.org Review URL: https://codereview.chromium.org/727593002 Cr-Commit-Position: refs/heads/master@{#304122}
* clang-format/java: Tweak style a bit.thakis2014-11-021-0/+3
| | | | | | | | | | | Based on formatting a few java files in base/ and comparing before/after. BUG=429372 NOTRY=true Review URL: https://codereview.chromium.org/697893002 Cr-Commit-Position: refs/heads/master@{#302406}
* Experiment with clang-format for android java files.thakis2014-10-311-0/+8
| | | | | | | | | BUG=429372 NOTRY=true Review URL: https://codereview.chromium.org/697783002 Cr-Commit-Position: refs/heads/master@{#302358}
* Roll buildtools to pull clang-format.thakis2014-10-311-0/+4
| | | | | | | | | BUG=428816 NOTRY=true Review URL: https://codereview.chromium.org/696843002 Cr-Commit-Position: refs/heads/master@{#302341}
* Roll buildtools to pull clang-format, Standard: Cpp11 in .clang-formatscottmg2014-09-251-0/+1
| | | | | | | | | | | Per bug discussion, add Standard: Cpp11 to encourage ">>" over "> >". TBR=thakis@chromium.org BUG=417296 Review URL: https://codereview.chromium.org/599093008 Cr-Commit-Position: refs/heads/master@{#296665}
* Add a .clang-format file to give us local control over Chromium style.jyasskin@chromium.org2013-11-011-0/+3
This also makes editor integration somewhat easier by letting editors pass just "-style=file -assume-filename=<filename>" to clang-format instead of needing to guess the desired style based on the path. We could name this file _clang-format instead, if that's easier for Windows. Review URL: https://codereview.chromium.org/52093012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232271 0039d316-1c4b-4281-b951-d872f2087c98