History log of /llvm-project/clang/lib/Format/Format.cpp (Results 1126 – 1150 of 1154)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 8f83ee46 21-Dec-2012 Nico Weber <nicolasweber@gmx.de>

format: Handle #import as include directive too.

llvm-svn: 170914


# 050948a5 21-Dec-2012 Daniel Jasper <djasper@google.com>

clang-format: No spaces around directory specifiers

This fixes PR14683. We used to format like this:
#include <a / b>

And this patch changes this to:
#include <a/b>

llvm-svn: 170910


# 3b1604e4 21-Dec-2012 Fariborz Jahanian <fjahanian@apple.com>

Fix typo.

llvm-svn: 170904


# fbde69e2 21-Dec-2012 Daniel Jasper <djasper@google.com>

Basic support for formatting for-loops.

We used to not really format them. Now we do:

for (MachineBasicBlock::succ_iterator SI = BB->succ_begin(),
SE = BB-

Basic support for formatting for-loops.

We used to not really format them. Now we do:

for (MachineBasicBlock::succ_iterator SI = BB->succ_begin(),
SE = BB->succ_end();
SI != SE; ++SI) {

This is just one example and I am sure we still mess some of them up, but it
is a step forward.

llvm-svn: 170899

show more ...


# ab7654e8 21-Dec-2012 Daniel Jasper <djasper@google.com>

Use OperatorPrecedence.h in clang-format

No indented functional changes other than handling more operators
correctly.

llvm-svn: 170875


# 8dd40473 21-Dec-2012 Daniel Jasper <djasper@google.com>

Formatting fixes for PR14680

Also, some (automated) formatting fixes and slight cleanups.

llvm-svn: 170873


Revision tags: llvmorg-3.2.0
# 68a542ae 20-Dec-2012 Fariborz Jahanian <fjahanian@apple.com>

Add objective-C style formatting to clang format and
use it to format xml declaration tags.
// rdar://12378714

llvm-svn: 170727


# 2af6bbe7 18-Dec-2012 Daniel Jasper <djasper@google.com>

Better support for constructor initializers.

We used to format initializers like this (with a sort of hacky implementation):
Constructor()
: Val1(A),
Val2(B) {

and now format like this (w

Better support for constructor initializers.

We used to format initializers like this (with a sort of hacky implementation):
Constructor()
: Val1(A),
Val2(B) {

and now format like this (with a somewhat better solution):
Constructor()
: Val1(A), Val2(B) {

assuming this would not fit on a single line. Also added tests.

As a side effect we now first analyze whether an UnwrappedLine needs to be
split at all. If not, not splitting it is the best solution by definition. As
this should be a very common case in normal code, not exploring the entire
solution space can provide significant speedup.

llvm-svn: 170457

show more ...


# 5485d0cd 17-Dec-2012 Daniel Jasper <djasper@google.com>

Add basic support for splitting before function calls if it can't be
avoided.

This required a minor modification of the memoization as now the
"CurrentPenalty" depends on whether or not we break bef

Add basic support for splitting before function calls if it can't be
avoided.

This required a minor modification of the memoization as now the
"CurrentPenalty" depends on whether or not we break before the current
token. Therefore, the CurrentPenalty should not be memoized but added
after retrieving a value from memory. This should not affect the runtime
behavior.

llvm-svn: 170337

show more ...


# e25509f8 17-Dec-2012 Daniel Jasper <djasper@google.com>

Fix several formatting problems.

More specifically:
- Improve formatting of static initializers.
- Fix formatting of lines comments in enums.
- Fix formmating of trailing line comments.

llvm-svn: 1

Fix several formatting problems.

More specifically:
- Improve formatting of static initializers.
- Fix formatting of lines comments in enums.
- Fix formmating of trailing line comments.

llvm-svn: 170316

show more ...


# a4396865 10-Dec-2012 Daniel Jasper <djasper@google.com>

Addi formatting tests for pointer template parameters.

Fix spacing before ",".

llvm-svn: 169746


# 2ca766f3 10-Dec-2012 Alexander Kornienko <alexfh@google.com>

Clang-format: error recovery for access specifiers

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D198

llvm-svn: 169738


# e327684b 07-Dec-2012 Alexander Kornienko <alexfh@google.com>

Clang-format: extracted FormatTokenSource from UnwrappedLineParser.

Summary: FormatTokenLexer is here, FormatTokenBuffer is on the way. This will allow to re-parse unwrapped lines when needed.

Revi

Clang-format: extracted FormatTokenSource from UnwrappedLineParser.

Summary: FormatTokenLexer is here, FormatTokenBuffer is on the way. This will allow to re-parse unwrapped lines when needed.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D186

llvm-svn: 169605

show more ...


# 2723403f 07-Dec-2012 Daniel Jasper <djasper@google.com>

Small tweaks to clang-format.

Now not joining keywords with '::' and not putting a space between
a pointer pointer.

llvm-svn: 169594


# 578fdd89 06-Dec-2012 Alexander Kornienko <alexfh@google.com>

Clang-format: IndentCaseLabels option, proper namespace handling

Summary: + tests arranged in groups, as their number is already quite large.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: c

Clang-format: IndentCaseLabels option, proper namespace handling

Summary: + tests arranged in groups, as their number is already quite large.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D185

llvm-svn: 169520

show more ...


# 26333c3b 06-Dec-2012 Daniel Jasper <djasper@google.com>

Improve clang-format's handling of unary operators.

llvm-svn: 169500


# e9de2604 06-Dec-2012 Daniel Jasper <djasper@google.com>

"<<" alignment for clang-format.

Also, small fix for handling the first token correctly.

Review: http://llvm-reviews.chandlerc.com/D177
llvm-svn: 169488


Revision tags: llvmorg-3.2.0-rc3
# 55b6b643 05-Dec-2012 Daniel Jasper <djasper@google.com>

Remove bad and useless enum to bool conversion.

llvm-svn: 169390


# aa1c920d 05-Dec-2012 Daniel Jasper <djasper@google.com>

Indentation fixes for clang-format.

- Fix behavior of memoization together with optimization
- Correctly attribute the PenaltyIndentLevel (breaking directly after "(" did
not count towards the inn

Indentation fixes for clang-format.

- Fix behavior of memoization together with optimization
- Correctly attribute the PenaltyIndentLevel (breaking directly after "(" did
not count towards the inner level)
- Recognize more tokens as assignments

Review: http://llvm-reviews.chandlerc.com/D172
llvm-svn: 169384

show more ...


# bc09a7ea 05-Dec-2012 Alexander Kornienko <alexfh@google.com>

Follow-up to r169286, addresses comments in http://llvm-reviews.chandlerc.com/D164#comment-4 : comments and a method rename

llvm-svn: 169382


# 426702dc 05-Dec-2012 Daniel Jasper <djasper@google.com>

Small tweaks to automatic formatting.

Recognize '!=' as a binary operator and assume that there are no
type definitions on the RHS of an assignment.

llvm-svn: 169363


# 61bd3a1d 04-Dec-2012 Daniel Jasper <djasper@google.com>

Add missing destructors found with -Wnon-virtual-dtor.

llvm-svn: 169303


# 870f9eb9 04-Dec-2012 Alexander Kornienko <alexfh@google.com>

Error recovery part 2

Summary: Adds recovery for structural errors in clang-format.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, silvas

Differential Revision: http://llvm-reviews.cha

Error recovery part 2

Summary: Adds recovery for structural errors in clang-format.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, silvas

Differential Revision: http://llvm-reviews.chandlerc.com/D164

llvm-svn: 169286

show more ...


# 6021c4a2 04-Dec-2012 Daniel Jasper <djasper@google.com>

Make parenthesis counting and aligning a bit saner.

Review: http://llvm-reviews.chandlerc.com/D162
llvm-svn: 169274


# 8b529711 04-Dec-2012 Daniel Jasper <djasper@google.com>

Small fixes to unary operator recognition and handling of include
directives.

llvm-svn: 169261


1...<<41424344454647