History log of /llvm-project/clang/lib/Format/Format.cpp (Results 651 – 675 of 1154)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 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 ...


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

clang-format: [JS] Support different function literal style.

Before:
goog.array.forEach(array, function() {
doSomething();
doSomething()

clang-format: [JS] Support different function literal style.

Before:
goog.array.forEach(array, function() {
doSomething();
doSomething();
},
this);

After:
goog.array.forEach(array, function() {
doSomething();
doSomething();
}, this);

llvm-svn: 209291

show more ...


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

clang-format: [JS] Support for EC6 arrow functions.

Before:
var b = a.map((x) = > x + 1);

After:
var b = a.map((x) => x + 1);

llvm-svn: 209112


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1
# c3f36af8 15-May-2014 Alp Toker <alp@nuanti.com>

Fix typos

llvm-svn: 208838


# 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 ...


# fb4333b0 12-May-2014 Daniel Jasper <djasper@google.com>

clang-format: [JS] Basic support for escape sequences in regex literals.

Before:
var regex = /\\/ g; // This isn't even recognized as regex.

After:
var regex = /\\/g; // It now is.

llvm-svn: 2

clang-format: [JS] Basic support for escape sequences in regex literals.

Before:
var regex = /\\/ g; // This isn't even recognized as regex.

After:
var regex = /\\/g; // It now is.

llvm-svn: 208539

show more ...


# f3ca2698 10-May-2014 Benjamin Kramer <benny.kra@googlemail.com>

Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.

Required pulling LambdaExpr::Capture into its own header.
No functionality change.

llvm-svn: 208470


# b05a81de 09-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix bug introduced by r208392.

Also run clang-format over clang-format's files.

llvm-svn: 208409


# 8f83a907 09-May-2014 Daniel Jasper <djasper@google.com>

clang-format: [JS] Allow up to 3 empty lines in Google's JS style.

llvm-svn: 208404


# 2145bc02 09-May-2014 Craig Topper <craig.topper@gmail.com>

[C++11] Use 'nullptr'.

llvm-svn: 208392


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

clang-format: [JS] Support regex literals after 'return'.

llvm-svn: 208285


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

clang-format: [JS] Initial support for regex literals.

llvm-svn: 208281


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

Enable alternative tokens by default for clang-format.

Patch by Bobby Moretti.

llvm-svn: 208269


# 79dffb41 07-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Be slightly more aggressive on single-line functions.

So that JS functions can also be merged into a single line.

Before:
var func = function() {
return 1;
};

After:
var fu

clang-format: Be slightly more aggressive on single-line functions.

So that JS functions can also be merged into a single line.

Before:
var func = function() {
return 1;
};

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

llvm-svn: 208176

show more ...


# afe6fb6f 05-May-2014 Dinesh Dwivedi <dinesh.d@samsung.com>

Fix bug in clang-format while merging short function

Before:
#ifdef _DEBUG
int foo( int i = 0 )
#else
int foo( int i = 5 )
#endif { return i; }

After:
#ifdef _DEBUG
int

Fix bug in clang-format while merging short function

Before:
#ifdef _DEBUG
int foo( int i = 0 )
#else
int foo( int i = 5 )
#endif { return i; }

After:
#ifdef _DEBUG
int foo( int i = 0 )
#else
int foo( int i = 5 )
#endif
{
return i;
}

llvm-svn: 207958

show more ...


# c282e54e 29-Apr-2014 Daniel Jasper <djasper@google.com>

clang-format: Remove accidentally added debug output.

llvm-svn: 207533


# 35995679 29-Apr-2014 Daniel Jasper <djasper@google.com>

clang-format: Allow single-line function in WebKit style.

Before:
void f() {
return; }

After:
void f() { return; }

llvm-svn: 207527


Revision tags: llvmorg-3.4.1, llvmorg-3.4.1-rc2
# 10346667 22-Apr-2014 Chandler Carruth <chandlerc@gmail.com>

[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, clang edition.

If you want more details about this, you can see some of the commit

[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, clang edition.

If you want more details about this, you can see some of the commits to
Debug.h in LLVM recently. This is just the clang section of a cleanup
I've done for all uses of DEBUG_TYPE in LLVM.

llvm-svn: 206849

show more ...


# 22059521 15-Apr-2014 NAKAMURA Takumi <geek4civic@gmail.com>

Format.cpp: Don't use initializer list.

llvm-svn: 206339


# 783bac6b 15-Apr-2014 Daniel Jasper <djasper@google.com>

clang-format: Understand proto text format without commas.

Also removed spaces before colons as they don't seem to be used
frequently.

Before:
optional int32 b = 2
[(foo_options) = {aaaaaaaaaaa

clang-format: Understand proto text format without commas.

Also removed spaces before colons as they don't seem to be used
frequently.

Before:
optional int32 b = 2
[(foo_options) = {aaaaaaaaaaaaaaaaaaa : 123 bbbbbbbbbbbbbbbbbbbbbbbb :
"baz"}];

After:
optional int32 b = 2 [(foo_options) = {aaaaaaaaaaaaaaaaaaa: 123,
bbbbbbbbbbbbbbbbbbbbbbbb:"baz"}];

llvm-svn: 206269

show more ...


# 20fd3c6f 15-Apr-2014 Daniel Jasper <djasper@google.com>

clang-format: Basic support for C++1y.

Before:
int bi{1 '000' 000};
After:
int bi{1'000'000};

This fixes llvm.org/PR19342.

llvm-svn: 206263


# 98583d52 15-Apr-2014 Daniel Jasper <djasper@google.com>

clang-format: Early cut-off for inlining nested blocks.

Specifically, for a nested block or lambda, don't try to put the single
statement body inline, if it exceeds the column limit.

This should no

clang-format: Early cut-off for inlining nested blocks.

Specifically, for a nested block or lambda, don't try to put the single
statement body inline, if it exceeds the column limit.

This should not change any observable behavior (as those would never
have led to the 'best' solution), but significantly speeds up formatting
time.

This fixes llvm.org/PR18761. Formatting time goes down from ~100s to a
few ms.

llvm-svn: 206260

show more ...


# c359ad00 15-Apr-2014 Daniel Jasper <djasper@google.com>

clang-format: Cache results of formatting nested blocks.

This somewhat improves the performance problem reported in
llvm.org/PR18761. No other behavior changes intended.

llvm-svn: 206258


# 68b03049 14-Apr-2014 Manuel Klimek <klimek@google.com>

Format code around VCS conflict markers.

Now correctly formats:
{
int a;
void f() {
callme(some(parameter1,
<<<<<<< text by the vcs
parameter2),
||||||| text by

Format code around VCS conflict markers.

Now correctly formats:
{
int a;
void f() {
callme(some(parameter1,
<<<<<<< text by the vcs
parameter2),
||||||| text by the vcs
parameter2),
parameter3,
======= text by the vcs
parameter2, parameter3),
>>>>>>> text by the vcs
otherparameter);
}
}

llvm-svn: 206157

show more ...


Revision tags: llvmorg-3.4.1-rc1
# 1fcbe675 11-Apr-2014 Manuel Klimek <klimek@google.com>

Correctly handle escaped newlines when the next token starts without a space.

We will need this to correctly handle conflict markers inside macro
definitions.

llvm-svn: 206029


1...<<21222324252627282930>>...47