#
21397a32 |
| 09-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix bug where clang-format would break the code.
Before, it would turn: SomeFunction([]() { // Cool function.. return 43; });
Into this: SomeFunction([]() { // Cool function
clang-format: Fix bug where clang-format would break the code.
Before, it would turn: SomeFunction([]() { // Cool function.. return 43; });
Into this: SomeFunction([]() { // Cool function.. return 43; });
llvm-svn: 205849
show more ...
|
#
3ae6f5a4 |
| 09-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Improve format of calls with several lambdas.
Before: SomeFunction([]() { int i = 42; return i; }, []() { int j =
clang-format: Improve format of calls with several lambdas.
Before: SomeFunction([]() { int i = 42; return i; }, []() { int j = 43; return j; });
After: SomeFunction([]() { int i = 42; return i; }, []() { int j = 43; return j; });
llvm-svn: 205848
show more ...
|
#
f9a0906b |
| 09-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Allow breaking between trailing annotations in more cases.
Before: void aaaaaaaaaaaaaa(aaaaaaaa aaa) override AAAAAAAAAAAAAAAAAAAAAAAA( aaaaaaaaaaaaaaa);
After: void aaaaaaa
clang-format: Allow breaking between trailing annotations in more cases.
Before: void aaaaaaaaaaaaaa(aaaaaaaa aaa) override AAAAAAAAAAAAAAAAAAAAAAAA( aaaaaaaaaaaaaaa);
After: void aaaaaaaaaaaaaa(aaaaaaaa aaa) override AAAAAAAAAAAAAAAAAAAAAAAA(aaaaaaaaaaaaaaa);
llvm-svn: 205846
show more ...
|
#
b48d3afc |
| 09-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Keep more trailing annotations on the same line.
More precisely keep all short annotations (<10 characters) on the same line if possible. Previously, clang-format would only prefer to
clang-format: Keep more trailing annotations on the same line.
More precisely keep all short annotations (<10 characters) on the same line if possible. Previously, clang-format would only prefer to do so for "const", "override" and "final". However, it seems to be generally preferable, especially because some codebases have to wrap those in macros for backwards compatibility.
Before: void someLongFunction(int someLongParameter) OVERRIDE {}
After: void someLongFunction( int someLongParameter) OVERRIDE {}
This fixes llvm.org/PR19363.
llvm-svn: 205845
show more ...
|
#
b175d57e |
| 09-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Recognize lists ending in trailing commas correctly.
Previously, this did not look through trailing comments leading to a few formatting oddities.
llvm-svn: 205843
|
#
b77105d2 |
| 08-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix incorrect multi-block-parameter computation.
llvm-svn: 205763
|
#
139d4a38 |
| 08-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Correctly understand arrays of pointers.
Before: A<int * []> a;
After: A<int *[]> a;
This fixes llvm.org/PR19360.
llvm-svn: 205761
|
#
d74cf403 |
| 08-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Extend AllowShortFunctions.. to only merge inline functions.
Before AllowShortFunctionsOnASingleLine could either be true, merging all functions, or false, merging no functions. This p
clang-format: Extend AllowShortFunctions.. to only merge inline functions.
Before AllowShortFunctionsOnASingleLine could either be true, merging all functions, or false, merging no functions. This patch adds a third value "Inline", which can be used to only merge short functions defined inline in a class, i.e.:
void f() { return 42; }
class C { void f() { return 42; } };
llvm-svn: 205760
show more ...
|
#
922349cd |
| 04-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Don't merge simple blocks in case statements.
Before: switch (a) { case 1: { return 'a'; } }
After: switch (a) { case 1: { return 'a'; } }
llvm-svn: 205611
|
#
5c33265c |
| 03-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Prefer an additional line-break over hanging indent.
Don't allow the RHS of an operator to be split over multiple lines unless there is a line-break right after the operator.
Before:
clang-format: Prefer an additional line-break over hanging indent.
Don't allow the RHS of an operator to be split over multiple lines unless there is a line-break right after the operator.
Before: if (aaaa && bbbbb || // break cccc) { }
After: if (aaaa && bbbbb || // break cccc) { }
In most cases, this seems to increase readability.
llvm-svn: 205527
show more ...
|
#
cc7bf7fd |
| 03-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Understand that "auto" is a type.
Before: MACRO(auto * a);
After: MACRO(auto *a);
llvm-svn: 205517
|
#
2b9036d5 |
| 01-Apr-2014 |
Aaron Ballman <aaron@aaronballman.com> |
Fixing the MSVC 2012 build bot, which cannot do initializer lists yet. Amends r205307.
llvm-svn: 205325
|
#
e1e4319a |
| 01-Apr-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Support configurable list of foreach-macros.
This fixes llvm.org/PR17242.
Patch by Brian Green, thank you!
llvm-svn: 205307
|
#
03b1bc7a |
| 28-Mar-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix aligning of comments and escaped newlines in macros.
Before: #define A \ int i; /*a*/ \ int jjj; /*b*/
After: #define A \ int i; /*a*/ \ int jj
clang-format: Fix aligning of comments and escaped newlines in macros.
Before: #define A \ int i; /*a*/ \ int jjj; /*b*/
After: #define A \ int i; /*a*/ \ int jjj; /*b*/
llvm-svn: 205011
show more ...
|
#
395193c7 |
| 28-Mar-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Recognize more ObjC blocks with parameters/return type.
llvm-svn: 204990
|
#
1f9d80ac |
| 27-Mar-2014 |
Manuel Klimek <klimek@google.com> |
Improve handling of bool expressions in template arguments.
Now correctly formats: foo<true && false>();
llvm-svn: 204950
|
#
5d2587da |
| 27-Mar-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Avoid line-breaks that increase the current column.
While these might make sense for some rule (e.g. break after multi-line operand), they generally appear ugly and confusing.
Before:
clang-format: Avoid line-breaks that increase the current column.
While these might make sense for some rule (e.g. break after multi-line operand), they generally appear ugly and confusing.
Before: fffffffffff(R\"x( multiline raw string literal xxxxxxxxxxxxxx )x\" + bbbbbb)
After: fffffffffff(R\"x( multiline raw string literal xxxxxxxxxxxxxx )x\" + bbbbbb)
llvm-svn: 204937
show more ...
|
#
f81e5c0e |
| 27-Mar-2014 |
Manuel Klimek <klimek@google.com> |
Fix bool expression special case.
Clang-format now correctly formats: some_type<a * b> v; template <bool a, bool b> typename enabled_if<a && b>::type f() {}
llvm-svn: 204913
|
#
c13ee343 |
| 27-Mar-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Correctly identify ObjC Block with return type.
llvm-svn: 204905
|
#
a65e8875 |
| 25-Mar-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix incorrect &/* detection.
Before: STATIC_ASSERT((a &b) == 0);
After: STATIC_ASSERT((a & b) == 0);
llvm-svn: 204709
|
#
a26fc5c9 |
| 21-Mar-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Add flag for removing empty lines at the start of blocks.
This unbreaks polly-formatting-tests and we can make a decision for LLVM style independently.
llvm-svn: 204467
|
#
01b35482 |
| 21-Mar-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Don't remove empty lines at the start of namespaces.
llvm-svn: 204462
|
#
11164bda |
| 21-Mar-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Remove empty lines at the beginning of blocks.
They very rarely aid readability.
Formatting: void f() {
if (a) {
f();
}
}
Now leads to: void f() { if (a)
clang-format: Remove empty lines at the beginning of blocks.
They very rarely aid readability.
Formatting: void f() {
if (a) {
f();
}
}
Now leads to: void f() { if (a) { f(); } }
llvm-svn: 204460
show more ...
|
#
a125d53a |
| 21-Mar-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Let a trailing comma in braced lists enforce linebreaks.
Before: vector<int> x{1, 2, 3, 4, };
After: vector<int> x{ 1, 2, 3, 4, };
This fixes llvm.org/PR18519.
llvm-svn:
clang-format: Let a trailing comma in braced lists enforce linebreaks.
Before: vector<int> x{1, 2, 3, 4, };
After: vector<int> x{ 1, 2, 3, 4, };
This fixes llvm.org/PR18519.
llvm-svn: 204458
show more ...
|
#
28df0a35 |
| 21-Mar-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix for r204456.
llvm-svn: 204457
|