#
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 ...
|
#
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
|
#
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
|
#
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 ...
|
#
fb6b25b5 |
| 15-Mar-2014 |
Craig Topper <craig.topper@gmail.com> |
[C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203999
|
#
b8984329 |
| 07-Mar-2014 |
Ahmed Charles <ahmedcharles@gmail.com> |
Replace OwningPtr with std::unique_ptr.
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.
llvm-svn: 203279
|
#
f8b7266d |
| 02-Mar-2014 |
Chandler Carruth <chandlerc@gmail.com> |
[C++11] Switch the clang-format LLVM style to use C++11 style braced init list formatting. This suggestion has now gone into the LLVM coding standards, and is particularly relevant now that we're usi
[C++11] Switch the clang-format LLVM style to use C++11 style braced init list formatting. This suggestion has now gone into the LLVM coding standards, and is particularly relevant now that we're using C++11.
Updated a really ridiculous number of tests to reflect this change.
llvm-svn: 202637
show more ...
|
#
a0407740 |
| 11-Feb-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix alignment of comments inside statements.
Before: auto result = SomeObject // Calling someFunction on SomeObject .someFunction();
After: aut
clang-format: Fix alignment of comments inside statements.
Before: auto result = SomeObject // Calling someFunction on SomeObject .someFunction();
After: auto result = SomeObject // Calling someFunction on SomeObject .someFunction();
llvm-svn: 201138
show more ...
|
#
64989968 |
| 07-Feb-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fix column limit violation for merged lines in macros.
Before (81 columns): #define A \ void aaaaaaaaaaaaaaa
clang-format: Fix column limit violation for merged lines in macros.
Before (81 columns): #define A \ void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() { return aaaaaaaa; } \ int i;
After: #define A \ void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() { \ return aaaaaaaa; \ } \ int i;
llvm-svn: 200974
show more ...
|
#
514ecc8c |
| 02-Feb-2014 |
Nico Weber <nicolasweber@gmx.de> |
clang-format: Let chromium style inherit google style's javascript tweaks.
llvm-svn: 200652
|
#
86fee2fa |
| 31-Jan-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: (JavaScript) Don't crash on empty string literals.
Before, this would lead to a crash: f('', true);
llvm-svn: 200540
|
#
e9beea24 |
| 28-Jan-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Add support for a space after @property
Mozilla and WebKit seem to use a space after @property (verified by grepping their codebases) so we turn this on there as well.
Change by Chris
clang-format: Add support for a space after @property
Mozilla and WebKit seem to use a space after @property (verified by grepping their codebases) so we turn this on there as well.
Change by Christian Legnitto. Thank you!
llvm-svn: 200320
show more ...
|
#
a55544a6 |
| 20-Jan-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Leave 2 empty lines in Google's JavaScript style.
As per the style guide, two lines are required between top-level elements.
llvm-svn: 199660
|
#
7052ce6d |
| 19-Jan-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Better support and testing for protocol buffers.
With this patch, there is dedicated testing for protocol buffers (https://developers.google.com/protocol-buffers/).
Also some minor tw
clang-format: Better support and testing for protocol buffers.
With this patch, there is dedicated testing for protocol buffers (https://developers.google.com/protocol-buffers/).
Also some minor tweaks formatting tweaks.
llvm-svn: 199580
show more ...
|
#
b2e10a54 |
| 15-Jan-2014 |
Daniel Jasper <djasper@google.com> |
clang-format: Fixed formatting of JavaScript container literals
Before: var arr = [ 1, 2, 3 ]; var obj = {a : 1, b : 2, c : 3};
After: var arr = [1, 2, 3]; var obj = {a: 1, b: 2, c: 3};
ll
clang-format: Fixed formatting of JavaScript container literals
Before: var arr = [ 1, 2, 3 ]; var obj = {a : 1, b : 2, c : 3};
After: var arr = [1, 2, 3]; var obj = {a: 1, b: 2, c: 3};
llvm-svn: 199317
show more ...
|
#
5553d0d4 |
| 07-Jan-2014 |
Chandler Carruth <chandlerc@gmail.com> |
Sort all the #include lines with LLVM's utils/sort_includes.py which encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up
Sort all the #include lines with LLVM's utils/sort_includes.py which encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well.
llvm-svn: 198686
show more ...
|
#
ce9161a5 |
| 02-Jan-2014 |
Alexander Kornienko <alexfh@google.com> |
Added an option to avoid splitting certain kinds of comments into lines.
Summary: Added CommentPragmas option for this.
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits, klimek
Dif
Added an option to avoid splitting certain kinds of comments into lines.
Summary: Added CommentPragmas option for this.
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D2460
llvm-svn: 198310
show more ...
|
#
ba5b4dc6 |
| 30-Dec-2013 |
Alp Toker <alp@nuanti.com> |
Fix and reword some typos
llvm-svn: 198191
|
#
234379fb |
| 24-Dec-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: (WebKit) Disallow 1-line constructors with initializers.
Before: Constructor() : a(a) {}
After: Constructor() : a(a) { }
This style guide is pretty precise about this.
clang-format: (WebKit) Disallow 1-line constructors with initializers.
Before: Constructor() : a(a) {}
After: Constructor() : a(a) { }
This style guide is pretty precise about this.
llvm-svn: 197980
show more ...
|
Revision tags: llvmorg-3.4.0 |
|
#
19a541ef |
| 19-Dec-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Increase penalty for breaking comments.
Unexpectedly, it seems that people commonly know what they were doing when writing a comment.
Also, being more conservative about comment break
clang-format: Increase penalty for breaking comments.
Unexpectedly, it seems that people commonly know what they were doing when writing a comment.
Also, being more conservative about comment breaking has the advantage of giving more flexibility. If a linebreak within the comment can improve formatting, the author can add it (after which clang-format won't undo it). There is no way to override clang-format's behavior if it breaks a comment.
llvm-svn: 197698
show more ...
|
#
bad63ae2 |
| 17-Dec-2013 |
Daniel Jasper <djasper@google.com> |
clang-format: Don't adapt local format to macros.
Formatting this: void f() { // 1 space initial indent. int i; #define A \ int i; \ int j; int k; // Format this lin
clang-format: Don't adapt local format to macros.
Formatting this: void f() { // 1 space initial indent. int i; #define A \ int i; \ int j; int k; // Format this line. } void f() { #define A 1 // Format this line. }
Before: void f() { // 1 space initial indent. int i; #define A \ int i; \ int j; int k; // Format this line. } void f() { #define A 1 // Format this line. }
After: void f() { // 1 space initial indent. int i; #define A \ int i; \ int j; int k; // Format this line. } void f() { #define A 1 // Format this line. }
llvm-svn: 197494
show more ...
|
Revision tags: llvmorg-3.4.0-rc3 |
|
#
a594ba8a |
| 16-Dec-2013 |
Alexander Kornienko <alexfh@google.com> |
Always break before the colon in constructor initializers, when BreakConstructorInitializersBeforeComma is true.
This option is used in WebKit style, so this also ensures initializer lists are not p
Always break before the colon in constructor initializers, when BreakConstructorInitializersBeforeComma is true.
This option is used in WebKit style, so this also ensures initializer lists are not put on a single line, as per the WebKit coding guidelines.
Patch by Florian Sowade!
llvm-svn: 197386
show more ...
|