History log of /llvm-project/clang/tools/clang-format/ClangFormat.cpp (Results 126 – 142 of 142)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d83adf30 02-Sep-2013 Alexander Kornienko <alexfh@google.com>

Whitespace changes in help messages + updated help output in .rst file.

llvm-svn: 189762


# bc36e6e0 02-Sep-2013 Chandler Carruth <chandlerc@gmail.com>

Switch the default mode for clang-format to '-file'. Make 'LLVM' the
fallback syntax used when we fail to find a '.clang-format' file. Adjust
variable names appropriately.

Update the editor integrat

Switch the default mode for clang-format to '-file'. Make 'LLVM' the
fallback syntax used when we fail to find a '.clang-format' file. Adjust
variable names appropriately.

Update the editor integration pieces that specify a '-style' option to
specify it as '-style=file'. I left the functionality in place because
even if the preferred method is to use '.clang-format' files, this way
if someone needs to clobber the style in their editor we show how to do
so in these examples.

Also check in a '.clang-format' file for Clang to ensure that separate
checkouts and builds of Clang from LLVM can still get the nice
formatting. =] This unfortunately required nuking the test for the
absence of a '.clang-format' file as now the directory happening to be
under your clang source tree will cause there to always be a file. ;]

llvm-svn: 189741

show more ...


# a49732ff 18-Jul-2013 Alexander Kornienko <alexfh@google.com>

Added -lines X:Y option to specify line range to process. This is a more human-friendly alternative to -offset and -length.

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

llvm-svn:

Added -lines X:Y option to specify line range to process. This is a more human-friendly alternative to -offset and -length.

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

llvm-svn: 186625

show more ...


# 16125fb6 16-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com>

Update for llvm API change.

llvm-svn: 186448


Revision tags: llvmorg-3.3.1-rc1
# 09573741 03-Jul-2013 Daniel Jasper <djasper@google.com>

Prevent error message when formatting an empty file.

This fixes llvm.org/PR16514.

llvm-svn: 185531


# 1e80887d 28-Jun-2013 Alexander Kornienko <alexfh@google.com>

Use lexing mode based on FormatStyle.Standard.

Summary:
Some valid pre-C++11 constructs change meaning when lexed in C++11
mode, e.g.
#define x(_a) printf("foo"_a);
(example from http://llvm.org/bug

Use lexing mode based on FormatStyle.Standard.

Summary:
Some valid pre-C++11 constructs change meaning when lexed in C++11
mode, e.g.
#define x(_a) printf("foo"_a);
(example from http://llvm.org/bugs/show_bug.cgi?id=16342). "foo"_a is treated as
a user-defined string literal when parsed in C++11 mode.
In order to deal with this correctly, we need to set lexing mode according to
which standard the code conforms to. We already have a configuration value for
this (FormatStyle.Standard), which seems to be appropriate to use in this case
as well.

Reviewers: klimek

CC: cfe-commits, gribozavr

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

llvm-svn: 185149

show more ...


Revision tags: llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2
# a8048b82 21-May-2013 Daniel Jasper <djasper@google.com>

Fix behavior of clang-format's -cursor flag.

llvm-svn: 182386


# 2a250b8b 21-May-2013 Daniel Jasper <djasper@google.com>

Let clang-format move the cursor appropriately.

With this patch, clang-format will try to keep the cursor at the
original code position in editor integrations (implemented for emacs and
vim). This m

Let clang-format move the cursor appropriately.

With this patch, clang-format will try to keep the cursor at the
original code position in editor integrations (implemented for emacs and
vim). This means, after formatting, clang-format will try to keep the
cursor on the same character of the same token.

llvm-svn: 182373

show more ...


# 006b5c89 19-May-2013 Alexander Kornienko <alexfh@google.com>

Clang-format: allow -style="{yaml/json}" on command line

Summary: + improved handling of default style and predefined styles.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits

Diffe

Clang-format: allow -style="{yaml/json}" on command line

Summary: + improved handling of default style and predefined styles.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 182205

show more ...


# 88a0d939 10-May-2013 Alexander Kornienko <alexfh@google.com>

Reformat clang-format help strings, filter out irrelevant options.

Summary: +updated ClangFormat.rst

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits

Differential Revision: http://

Reformat clang-format help strings, filter out irrelevant options.

Summary: +updated ClangFormat.rst

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 181617

show more ...


# 70f6b3b6 10-May-2013 Alexander Kornienko <alexfh@google.com>

Updated clang-format help messages for -offset and -length

llvm-svn: 181593


# fa94cbb7 10-May-2013 Alexander Kornienko <alexfh@google.com>

Minor clarifications in help messages and a comment.

llvm-svn: 181591


# 49149677 10-May-2013 Alexander Kornienko <alexfh@google.com>

Config file support for clang-format, part 2.

Summary:
Adds actual config file reading to the clang-format utility.
Configuration file name is .clang-format. It is looked up for each input file
in i

Config file support for clang-format, part 2.

Summary:
Adds actual config file reading to the clang-format utility.
Configuration file name is .clang-format. It is looked up for each input file
in its parent directories starting from immediate one. First found .clang-format
file is used. When using standard input, .clang-format is searched starting from
the current directory.
Added -dump-config option to easily create configuration files.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits, jordan_rose, kimgr

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

llvm-svn: 181589

show more ...


Revision tags: llvmorg-3.3.0-rc1
# c860266e 06-May-2013 Alexander Kornienko <alexfh@google.com>

Added Mozilla style, cleaned get*Style methods.

Summary: Patch based on a patch by Ehsan Akhgari.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

Differential Revision: http://ll

Added Mozilla style, cleaned get*Style methods.

Summary: Patch based on a patch by Ehsan Akhgari.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

llvm-svn: 181196

show more ...


# 3fbee010 24-Apr-2013 Alexander Kornienko <alexfh@google.com>

clang-format support for multiple input files.

Summary:
Added support for multiple input files, that can be used both with and
without in-place edit (-i) option. Added checks for -offset and -length

clang-format support for multiple input files.

Summary:
Added support for multiple input files, that can be used both with and
without in-place edit (-i) option. Added checks for -offset and -length options:
don't allow them on multiple files, check that they don't fall outside input
file, made both options unsigned, so that there's no need to check for negative
values. Removed "-1 can be used for end-of-file" from -length description.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits

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

llvm-svn: 180185

show more ...


# 4b14f4f9 08-Apr-2013 Daniel Jasper <djasper@google.com>

Remove outdated part of help message.

The styles are now documented with the -style option. This fixes
llvm.org/PR15689.

llvm-svn: 179017


# 9be2c5cf 20-Mar-2013 Daniel Jasper <djasper@google.com>

Add clang-format binary to cfe.

llvm-svn: 177506


123456