- Mar 21, 2016
-
-
Daniel Jasper authored
This patch adds a regular expression to configure suffixes of an included file to check whether it is the "main" include of the current file. Previously, clang-format has allowed arbitrary suffixes on the formatted file, which is still the case when no IncludeMainRegex is specified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263943 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 27, 2016
-
-
https://bugzilla.gnome.org/show_bug.cgi?id=506243Alexander Kornienko authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262138 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 23, 2016
-
-
Alexander Kornienko authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261646 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexander Kornienko authored
Use uniform style for inline code blocks, specify language for YAML code blocks, various formatting fixes etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261645 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexander Kornienko authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261643 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 14, 2016
-
-
Sylvestre Ledru authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260856 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 18, 2015
-
-
Zachary Turner authored
This changes the behavior of AlwaysBreakAfterDeclarationReturnType so that it supports breaking after declarations, definitions, or both. Differential Revision: http://reviews.llvm.org/D10370 Reviewed By: Daniel Jasper git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256046 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 27, 2015
-
-
Daniel Jasper authored
Summary: If this option is set, clang-format will always insert a line wrap, e.g. before the first parameter of a function call unless all parameters fit on the same line. This obviates the need to make a decision on the alignment itself. Use this style for Google's JavaScript style and add some minor tweaks to correctly handle nested blocks etc. with it. Don't use this option for for/while loops. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D14104 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251405 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 07, 2015
-
-
Daniel Jasper authored
Otherwise I will have to install sphinx ;).. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249542 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 06, 2015
-
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249394 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
This was made much easier by introducing an IncludeCategory struct to replace the previously used std::pair. Also, cleaned up documentation and added examples. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249392 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 05, 2015
-
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249312 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
statement. Specifically, we don't want people that have already written a patch to just write a style guide for their 1-person project. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249290 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249289 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 29, 2015
-
-
Daniel Jasper authored
control the individual braces. The existing choices for brace wrapping are now merely presets for the different flags that get expanded upon calling the reformat function. All presets have been chose to keep the existing formatting, so there shouldn't be any difference in formatting behavior. Also change the dump_format_style.py to properly document the nested structs that are used to keep these flags discoverable among all the configuration flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248802 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 10, 2015
-
-
Roman Kashitsyn authored
Summary: Add brace style `BS_WebKit` as described on https://www.webkit.org/coding/coding-style.html: * Function definitions: place each brace on its own line. * Other braces: place the open brace on the line preceding the code block; place the close brace on its own line. Set brace style used in `getWebKitStyle()` to the newly added `BS_WebKit`. Reviewers: djasper, klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D11837 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244446 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 12, 2015
-
-
Birunthan Mohanathas authored
Differential Revision: http://reviews.llvm.org/D10883 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241986 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 03, 2015
-
-
Birunthan Mohanathas authored
The MacroBlockBegin and MacroBlockEnd options make matching macro identifiers behave like '{' and '}', respectively, in terms of indentation. Mozilla code, for example, uses several macros that begin and end a scope. Previously, Clang-Format removed the indentation resulting in: MACRO_BEGIN(...) MACRO_ENTRY(...) MACRO_ENTRY(...) MACRO_END Now, using the options MacroBlockBegin: "^[A-Z_]+_BEGIN$" MacroBlockEnd: "^[A-Z_]+_END$" will yield the expected result: MACRO_BEGIN(...) MACRO_ENTRY(...) MACRO_ENTRY(...) MACRO_END Differential Revision: http://reviews.llvm.org/D10840 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241363 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 29, 2015
-
-
Birunthan Mohanathas authored
Differential Revision: http://reviews.llvm.org/D10774 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240959 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 27, 2015
-
-
Birunthan Mohanathas authored
This is a comment-only change to test commit access. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240879 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 18, 2015
-
-
Daniel Jasper authored
In essence this is meant to consistently indent multiline strings by a fixed amount of spaces from the start of the line. Don't do this in cases where it wouldn't help anyway. Before: someFunction(aaaaa, "aaaaa" "bbbbb"); After: someFunction(aaaaa, "aaaaa" "bbbbb"); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240004 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 11, 2015
-
-
Daniel Jasper authored
In the long run, these two might be independent or we might to only allow specific combinations. Until we have a corresponding request, however, it is hard to do the right thing and choose the right configuration options. Thus, just don't touch the options yet and just modify the behavior slightly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239531 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 11, 2015
-
-
Jonathan Roelofs authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236965 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jonathan Roelofs authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236964 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 29, 2015
-
-
Daniel Jasper authored
In Objective-C some style guides use a style where assignment operators are aligned, in an effort to increase code readability. This patch adds an option to the format library which allows this functionality. It is disabled by default for all the included styles, so it must be explicitly enabled. The option will change code such as: - (void)method { NSNumber *one = @1; NSNumber *twentyFive = @25; } to: - (void)method { NSNumber *one = @1; NSNumber *twentyFive = @25; } Patch by Matt Oakes. Thank you! Accidentally reformatted all the tests... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236100 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 02, 2014
-
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223118 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
With alignment: int aaaaaa = aa + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb * cccccccccccccccccccccccccccccccc; Without alignment: int aaaaaa = aa + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb * cccccccccccccccccccccccccccccccc; This fixes llvm.org/PR21666. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223117 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 28, 2014
-
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220786 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 09, 2014
-
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219407 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
This is desirable for the Chromium style guide: http://www.chromium.org/developers/coding-style git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219400 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 07, 2014
-
-
Daniel Jasper authored
Patch by Marek Kurdej, thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219204 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 16, 2014
-
-
Dan Liew authored
Fix warning introduced by r211098. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217864 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 15, 2014
-
-
Daniel Jasper authored
This will allow: int aaaaaaaaaaaaaa = bbbbbbbbbbbbbb + ccccccccccccccc; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217757 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 10, 2014
-
-
Dan Liew authored
Fix sphinx warning introduced by r217501. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217524 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
On a single line: switch (a) { case 1: x = 1; return; case 2: x = 2; return; default: break; } Not on a single line: switch (a) { case 1: x = 1; return; case 2: x = 2; return; default: break; } This partly addresses llvm.org/PR16535. In the long run, we probably want to lay these out in columns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217501 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 03, 2014
-
-
Daniel Jasper authored
This permits to add a space after closing parenthesis of a C-style cast. Defaults to false to preserve old behavior. Fixes llvm.org/PR19982. Before: (int)i; After: (int) i; Patch by Marek Kurdej. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217022 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 26, 2014
-
-
Daniel Jasper authored
Before: int a[5]; a[3] += 42; After: int a[ 5 ]; a[ 3 ] += 42; Fixes LLVM bug #17887 (http://llvm.org/bugs/show_bug.cgi?id=17887). Patch by Marek Kurdej, thank you! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216449 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 12, 2014
-
-
Alexander Kornienko authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215443 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 06, 2014
-
-
Dan Liew authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214967 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 05, 2014
-
-
Daniel Jasper authored
This is required for GNU coding style, among others. Also update the configuration documentation. Modified from an original patch by Jarkko Hietaniemi, thank you! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214858 91177308-0d34-0410-b5e6-96231b3b80d8
-