| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
They are very similar to import statements.
llvm-svn: 235582
|
|
|
|
| |
llvm-svn: 235580
|
|
|
|
|
|
| |
Adapted patch from Sergey Razmetov. Thank you.
llvm-svn: 235492
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is now obvious as the pointer alignment behavior was changed.
Before (even with pointer alignment "Left"):
MACRO Constructor(const int &i) : a(a), b(b) {}
After:
MACRO Constructor(const int& i) : a(a), b(b) {}
llvm-svn: 235301
|
|
|
|
|
|
| |
Patch by Martin Probst. Thank you.
llvm-svn: 235078
|
|
|
|
|
|
|
| |
space where we already had the flag ObjCSpaceBeforeProtocolList to
control it. I don't know what I was thinking.
llvm-svn: 235076
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
for (int i = 0; i < in [a]; ++i) ..
After:
for (int i = 0; i < in[a]; ++i) ..
Also do some related cleanups.
llvm-svn: 234980
|
|
|
|
|
|
| |
Patch by Martin Probst.
llvm-svn: 234754
|
|
|
|
|
|
| |
Patch by Martin Probst. Thank you.
llvm-svn: 234753
|
|
|
|
|
|
| |
Patch by Martin Probst. Thank you.
llvm-svn: 234752
|
|
|
|
| |
llvm-svn: 234320
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes formatting unnamed bitfields (llvm.org/PR21999).
Before:
struct MyStruct {
uchar data;
uchar:
8;
uchar:
8;
uchar other;
};
After:
struct MyStruct {
uchar data;
uchar : 8;
uchar : 8;
uchar other;
};
llvm-svn: 234318
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
functionA(functionB({
int i;
int j;
}),
aaaa, bbbb, cccc);
After:
functionA(functionB({
int i;
int j;
}),
aaaa, bbbb, cccc);
llvm-svn: 234304
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaaaaaaaaa //
.aaaa( //
bbbb) // This is different ..
.aaaa( //
cccc); // .. from this.
After:
aaaaaaaaaaa //
.aaaa( //
bbbb) // This is identical ..
.aaaa( //
cccc); // .. to this.
llvm-svn: 234300
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
let theObject = {someMethodName() {
doTheThing();
doTheOtherThing();
},
someOtherMethodName() {
doSomething();
doSomethingElse();
}};
After:
let theObject = {
someMethodName() {
doTheThing();
doTheOtherThing();
},
someOtherMethodName() {
doSomething();
doSomethingElse();
}
};
llvm-svn: 234091
|
|
|
|
| |
llvm-svn: 234055
|
|
|
|
| |
llvm-svn: 233698
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
goog.scope(function() {
// test
var x = 0;
// test
});
After:
goog.scope(function() {
// test
var x = 0;
// test
});
llvm-svn: 233530
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaaaaaa(aaaaaaaaaa,
bbbbbbbbbb).a();
After:
aaaaaaaa(aaaaaaaaaa,
bbbbbbbbbb)
.a();
llvm-svn: 233304
|
|
|
|
|
|
|
| |
NewlinesBefore and HasUnescapedNewline were not properly propagated
leading to llvm.org/PR23032.
llvm-svn: 233276
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void aaaaa(
aaaaaaaaaaaa* aaaaaaaaaaaaaa) {} // even violation the column limit
After:
void aaaaa(aaaaaaaaaaaa*
aaaaaaaaaaaaaa) {}
llvm-svn: 232717
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaa*
const aaaaaaaaaaaa) {}
After:
void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaa* const aaaaaaaaaaaa) {}
llvm-svn: 232635
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
spacing also fixed by r230473.
The fix in r230473 was done to enable fixing the spacing for
std::function<void( int, int )>.
I did not realized that it also fixed this
issue. Since it is fairly different from
Deleted &operator=(const Deleted &)& = default;
fixed in r230473, it seems sensible to add the regression test for it.
Also cleaned up the test by removing duplicated code and comment, and kept
repeated test set consistent.
Result of running the new tests with r230473 backed out:
[ RUN ] FormatTest.ConfigurableSpacesInParentheses
Actual: "std::function<void(int, int)> callback;"
Expected: "std::function<void( int, int )> callback;"
Actual: "std::function<void( int, int )> callback;"
Expected: "std::function<void(int, int)> callback;"
Actual: "std::function<void( int, int ) > callback;"
Expected: "std::function<void(int, int)> callback;"
[ FAILED ] FormatTest.ConfigurableSpacesInParentheses (402 ms)
Result of new tests with r230473:
[ RUN ] FormatTest.ConfigurableSpacesInParentheses
[ OK ] FormatTest.ConfigurableSpacesInParentheses (209 ms)
Review: http://reviews.llvm.org/D7922
Patch by Jean-Philippe Dufraigne. Thanks!
llvm-svn: 232632
|
|
|
|
|
|
|
|
|
| |
Casts in TS syntax (foo = <type>bar;) should not be followed by
whitespace.
Patch by Martin Probst. Thank you.
llvm-svn: 232321
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current enum detection is overly aggressive. As NestingLevel only
applies per line (?) it classifies many if not most object literals as
enum declarations and adds superfluous line breaks into them. This
change narrows the heuristic by requiring an assignment just before the
open brace and requiring the line to start with an identifier.
Patch by Martin Probst. Thank you.
llvm-svn: 232320
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Formatting:
#define A { {
#define B } }
Before:
#define A \
{ \
{ #define B } \
}
After:
#define A \
{ \
{
#define B \
} \
}
This fixes llvm.org/PR22884.
llvm-svn: 232166
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
- (void)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
(SoooooooooooooooooooooomeType *)bbbbbbbbbb;
After:
- (void)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
(SoooooooooooooooooooooomeType *)bbbbbbbbbb;
llvm-svn: 232112
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
LoooooooooooongType *
loooooooooooongVariable;
After:
LoooooooooooongType
*loooooooooooongVariable;
llvm-svn: 232044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
A a = new A(){public String toString(){return "NotReallyA";
}
}
;
After:
A a = return new A() {
public String toString() {
return "NotReallyA";
}
};
This fixes llvm.org/PR22878.
llvm-svn: 232042
|
|
|
|
|
|
|
|
|
|
| |
Before:
if (a &&(b = c)) ..
After:
if (a && (b = c)) ..
llvm-svn: 231920
|
|
|
|
|
|
|
|
|
|
|
| |
I.e.:
#define A public:
// The new line before this line would be removed.
int a;
llvm-svn: 231636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was already a TODO to double-check whether the extra indenation
makes sense. A slightly different case reveals that it is actively harmful:
for (int i = 0; i < aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
bbbbbbbbbbbbbbbbbbbb < ccccccccccccccc;
++i) {
}
Here (and it is probably not a totally infrequent case, it just works out that
"i < " is four spaces and so the four space extra indentation makes the
operator precedence confusing. So, this will now instead be formatted
as:
for (int i = 0; i < aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
bbbbbbbbbbbbbbbbbbbb < ccccccccccccccc;
++i) {
}
llvm-svn: 231461
|
|
|
|
|
|
|
|
|
| |
With incomplete code, we aren't guaranteed to generated changes for
every token. In that case, we need to assume that even the very first
change can continue a preprocessor directive and initialize values
accordingly.
llvm-svn: 231066
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaaaaaaaaaaaaaaaaaaaa(
[](aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &aaa)
-> aaaaaaaaaaaaaaaaaaaaa { return aaaaaaaaaaaaaaaaa; });
After:
aaaaaaaaaaaaaaaaaaaaaa(
[](aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &aaa) -> aaaaaaaaaaaaaaaaaaaaa {
return aaaaaaaaaaaaaaaaa;
});
llvm-svn: 230942
|
|
|
|
|
|
|
|
| |
Seems like the most consistent thing to do and in multi-var DeclStmts,
it is especially important to point out that the */& bind to the
identifier.
llvm-svn: 230903
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
NSArray *array = @[ @"a", @"a", ];
After:
NSArray *array = @[
@"a",
@"a",
];
llvm-svn: 230741
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
Aaaa aaaaaaaaaaa{
{
a, // +1 indent weird.
b, // trailing comma signals one per line.
}, // trailing comma signals one per line.
};
After:
Aaaa aaaaaaaaaaa{
{
a, // better!?
b, // trailing comma signals one per line.
}, // trailing comma signals one per line.
};
Interesting that this apparently was entirely untested :-(.
llvm-svn: 230627
|
|
|
|
|
|
|
|
|
|
| |
Before:
vector<int>(*foo_)[6];
After:
vector<int> (*foo_)[6];
llvm-svn: 230625
|
|
|
|
|
|
| |
This isn't generally nice, but better than violating the column limit.
llvm-svn: 230620
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
.. when using SpacesInCStyleCastParentheses != SpacesInParentheses.
Before:
FormatStyle Spaces = getLLVMStyle();
Deleted &operator=(const Deleted &)& = default;
Spaces.SpacesInParentheses = true;
Deleted(const Deleted &)& = default;
Spaces.SpacesInCStyleCastParentheses = true;
Spaces.SpacesInParentheses= false;
Deleted( const Deleted & )& = default;
After:
FormatStyle Spaces = getLLVMStyle();
Deleted &operator=(const Deleted &)& = default;;
Spaces.SpacesInParentheses= true;
Deleted( const Deleted & )& = default;
Spaces.SpacesInCStyleCastParentheses = true;
Spaces.SpacesInParentheses= false;
Deleted(const Deleted &)& = default;
Patch by Jean-Philippe Dufraigne. Thank you!
llvm-svn: 230473
|
|
|
|
|
|
| |
Commit of patch in http://reviews.llvm.org/D7871
llvm-svn: 230395
|
|
|
|
|
|
| |
Commit of review http://reviews.llvm.org/D7766
llvm-svn: 230061
|
|
|
|
|
|
|
|
|
| |
Merge template strings (marked by backticks ``).
Do not format any contents of template strings.
Patch by Martin Probst. Thank you.
llvm-svn: 230011
|
|
|
|
|
|
| |
Patch by Martin Probst, thank you!
llvm-svn: 229865
|
|
|
|
|
|
| |
Patch by Martin Probst.
llvm-svn: 229863
|
|
|
|
|
|
| |
Patch by Martin Probst. Thank you.
llvm-svn: 229862
|
|
|
|
|
|
| |
Committing patch http://reviews.llvm.org/D6800.
llvm-svn: 229783
|
|
|
|
|
|
|
|
| |
Based on Java annotation support and style.
Patch by Martin Probst.
llvm-svn: 229703
|
|
|
|
|
|
|
|
|
|
| |
This adds support for JavaScript class definitions (again following
TypeScript & AtScript style). This only required support for
visibility modifiers in JS, everything else was already working.
Patch by Martin Probst, thank you.
llvm-svn: 229701
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for type annotations that follow TypeScript's,
Flow's, and AtScript's syntax style.
Patch by Martin Probst, thank you.
Review: http://reviews.llvm.org/D7721
llvm-svn: 229700
|