History log of /llvm-project/clang/unittests/Format/FormatTest.cpp (Results 1201 – 1225 of 2034)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# a69ca9be 04-Jun-2014 Daniel Jasper <djasper@google.com>

clang-format: Leave empty lines within UnwrappedLines.

These are commonly used to structure things like enums or long braced
lists. There doesn't seem to be a good reason to have the behavior in
suc

clang-format: Leave empty lines within UnwrappedLines.

These are commonly used to structure things like enums or long braced
lists. There doesn't seem to be a good reason to have the behavior in
such structures be different from the behavior between statements.

llvm-svn: 210183

show more ...


# 7d028298 02-Jun-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix special case of binary operator detection.

There is a pattern where evaluation order is used as control flow.
This patch special-cases a commonly occuring version of this pattern.

clang-format: Fix special case of binary operator detection.

There is a pattern where evaluation order is used as control flow.
This patch special-cases a commonly occuring version of this pattern.

Before:
Aaaaa *aaa = nullptr;
// ...
aaa &&aaa->f();

After:
Aaaaa *aaa = nullptr;
// ...
aaa && aaa->f();

llvm-svn: 210017

show more ...


# 4afc6b3e 02-Jun-2014 Daniel Jasper <djasper@google.com>

clang-format: No space between ")" and braced init list.

Before:
auto j = decltype(i) {};

After:
auto j = decltype(i){};

This fixes llvm.org/PR19892.

llvm-svn: 210013


# e18ff37e 02-Jun-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix Allman brace breaking of enums.

Before:
enum Side
{ LEFT,
RIGHT };

After:
enum Side
{
LEFT,
RIGHT
};

This fixes llvm.org/PR19911.

llvm-svn: 210011


# e3f907fd 02-Jun-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix trailing const (etc.) with Allman brace style.

Before:
void someLongFunction(int someLongParameter)
const
{
}

After:
void someLongFunction(
int someLongParamet

clang-format: Fix trailing const (etc.) with Allman brace style.

Before:
void someLongFunction(int someLongParameter)
const
{
}

After:
void someLongFunction(
int someLongParameter) const
{
}

This fixes llvm.org/PR19912.

llvm-svn: 210010

show more ...


# 3ae0620a 31-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

There is no std::errc:success, remove the llvm one.

llvm-svn: 209959


# d39312ec 28-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Don't break before a case's colon.

Before (with just the right line length:
switch (a) {
case some_namespace::some_constant
:
return;
}

After:
switch (a) {
case so

clang-format: Don't break before a case's colon.

Before (with just the right line length:
switch (a) {
case some_namespace::some_constant
:
return;
}

After:
switch (a) {
case some_namespace::
some_constant:
return;
}

llvm-svn: 209725

show more ...


# 335ff266 28-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Format array and dict literals similar to blocks.

Especially, reduce the amount of indentation if it doesn't increase
readability.

Before:
NSMutableDictionary* dictionary = [NSMutab

clang-format: Format array and dict literals similar to blocks.

Especially, reduce the amount of indentation if it doesn't increase
readability.

Before:
NSMutableDictionary* dictionary = [NSMutableDictionary
dictionaryWithDictionary:@{
aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaa,
bbbbbbbbbbbbbbbbbb : bbbbb,
cccccccccccccccc : ccccccccccccccc
}];

After:
NSMutableDictionary* dictionary =
[NSMutableDictionary dictionaryWithDictionary:@{
aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaa,
bbbbbbbbbbbbbbbbbb : bbbbb,
cccccccccccccccc : ccccccccccccccc
}];

llvm-svn: 209720

show more ...


# ba1b6bb6 26-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Keep '{' of dict literals on the same line in Allman style

Before:
void f()
{
[object
someMethod:@
{ @"a" : @"b" }];
}

After:
void f()
{
[object some

clang-format: Keep '{' of dict literals on the same line in Allman style

Before:
void f()
{
[object
someMethod:@
{ @"a" : @"b" }];
}

After:
void f()
{
[object someMethod:@{ @"a" : @"b" }];
}

This fixes llvm.org/PR19854.

llvm-svn: 209615

show more ...


# 565ed5ed 22-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Don't use Allman brace breaking for ObjC blocks.

It just seems wrong. This fixes llvm.org/PR19736.

llvm-svn: 209440


# bd630737 22-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix corner case in AllowShortBlocksOnASingleLine.

Before:
template <int> struct A4 { A4() { }
};

After:
template <int i> struct A4 {
A4() {}
};

This fixes llvm.org/PR1981

clang-format: Fix corner case in AllowShortBlocksOnASingleLine.

Before:
template <int> struct A4 { A4() { }
};

After:
template <int i> struct A4 {
A4() {}
};

This fixes llvm.org/PR19813 (at least the part that isn't working as
intended).

llvm-svn: 209438

show more ...


# 91b032ab 22-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix braced list detection.

Before:
static_assert(std::is_integral<int> {} + 0, "");
int a = std::is_integral<int> {}
+ 0;

After:
static_assert(std::is_integral<int>{} + 0, "")

clang-format: Fix braced list detection.

Before:
static_assert(std::is_integral<int> {} + 0, "");
int a = std::is_integral<int> {}
+ 0;

After:
static_assert(std::is_integral<int>{} + 0, "");
int a = std::is_integral<int>{} + 0;

llvm-svn: 209431

show more ...


# 438059e5 22-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix incorrect braced init identification.

Before:
int foo(int i) {
return fo1 {}
(i);
}
int foo(int i) {
return fo1 {}
(i);
}

After:
int foo(int i) { return

clang-format: Fix incorrect braced init identification.

Before:
int foo(int i) {
return fo1 {}
(i);
}
int foo(int i) {
return fo1 {}
(i);
}

After:
int foo(int i) { return fo1{}(i); }
int foo(int i) { return fo1{}(i); }

This fixes llvm.org/PR19812.

llvm-svn: 209428

show more ...


# 3948516a 22-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Correctly identify multiplications in braces init lists.

Before:
int i{a *b};

After:
int i{a * b};

Also fix unrelated issue where braced init lists were counted as blocks
and pre

clang-format: Correctly identify multiplications in braces init lists.

Before:
int i{a *b};

After:
int i{a * b};

Also fix unrelated issue where braced init lists were counted as blocks
and prevented single-line functions.

llvm-svn: 209412

show more ...


# 5f3ea477 22-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Correctly calculate line lenghts for nest blocks.

If simple (one-statement) blocks can be inlined, the length needs to be
calculated correctly.

Before (in JavaScript but this also aff

clang-format: Correctly calculate line lenghts for nest blocks.

If simple (one-statement) blocks can be inlined, the length needs to be
calculated correctly.

Before (in JavaScript but this also affects lambdas, etc.):
var x = {
valueOf: function() { return 1; }
};

After:
var x = {valueOf: function() { return 1; }};

llvm-svn: 209410

show more ...


# 5ebb2f36 21-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix incorrect macro call detection.

In:
struct A {
A()
noexcept(....) {}
};

'A()' is not a macro call.
This fixes llvm.org/PR19814.

llvm-svn: 209294


# 7f0c5171 19-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Don't force line breaks in ObjC calls with ColumnLimit 0.

Before:
[self.x a:b c:d];

Got reformatted toi (with ColumnLimit set to 0):
[self.x a:b
c:d];

llvm-svn: 209114


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1
# 17605d39 14-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Add option to allow short blocks on a single line.

With AllowShortBlocksOnASingleLine, clang-format allows:
if (a) { return; }

Based on patch by Gonzalo BG, thank you!

llvm-svn: 20

clang-format: Add option to allow short blocks on a single line.

With AllowShortBlocksOnASingleLine, clang-format allows:
if (a) { return; }

Based on patch by Gonzalo BG, thank you!

llvm-svn: 208765

show more ...


# 0a1e5ace 13-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Don't break in the middle of ">>".

Before:
zzzzzzzzzz = bbbbbbbbbbbbbbbbb >
> aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
zzzzzzzzzz
= bbbbbbbbbbbbbb

clang-format: Don't break in the middle of ">>".

Before:
zzzzzzzzzz = bbbbbbbbbbbbbbbbb >
> aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
zzzzzzzzzz
= bbbbbbbbbbbbbbbbb
>> aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa);

This fixes llvm.org/PR19731.

llvm-svn: 208672

show more ...


# 04a71a45 08-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Initial support for try-catch.

Most of this patch was created by Alexander Rojas in
http://reviews.llvm.org/D2555
Thank you!

Synced and addressed review comments.

llvm-svn: 208302


# ea2d042f 08-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix binary operator detection before lambdas.

Before:
bool foo = true&& [] { return false; }();

After:
bool foo = true && [] { return false; }();

llvm-svn: 208288


# e08a91ec 08-May-2014 Nikola Smiljanic <popizdeh@gmail.com>

Enable alternative tokens by default for clang-format.

Patch by Bobby Moretti.

llvm-svn: 208269


# 8acf822b 07-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix corner cases for comments in if conditions.

Before:
if ( // a
x + 3) { ..

After:
if ( // a
x + 3) { ..

llvm-svn: 208175


# 7a2d60e3 07-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix bad space before braced initializer.

Before:
new int {1};

After:
new int{1};

llvm-svn: 208168


# 2e92e66f 06-May-2014 Dinesh Dwivedi <dinesh.d@samsung.com>

Fixed one issue with casting

Before:
(void) SimplifyICmpOperands(Cond, LHS, RHS);

After:
(void)SimplifyICmpOperands(Cond, LHS, RHS);

Differential Revision: http://reviews.llvm.org/D3615

llvm-svn:

Fixed one issue with casting

Before:
(void) SimplifyICmpOperands(Cond, LHS, RHS);

After:
(void)SimplifyICmpOperands(Cond, LHS, RHS);

Differential Revision: http://reviews.llvm.org/D3615

llvm-svn: 208080

show more ...


1...<<41424344454647484950>>...82