History log of /llvm-project/clang/lib/Format/Format.cpp (Results 501 – 525 of 1154)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 9c8ff355 21-Mar-2016 Daniel Jasper <djasper@google.com>

clang-format: Make include sorting's main include detection configurable.

This patch adds a regular expression to configure suffixes of an
included file to check whether it is the "main" include of

clang-format: Make include sorting's main include detection configurable.

This patch adds a regular expression to configure suffixes of an
included file to check whether it is the "main" include of the current
file. Previously, clang-format has allowed arbitrary suffixes on the
formatted file, which is still the case when no IncludeMainRegex is
specified.

llvm-svn: 263943

show more ...


# 97439926 17-Mar-2016 Daniel Jasper <djasper@google.com>

clang-format: [JS] Make requoting of JavaScript string literals only
change affected ranges.

llvm-svn: 263713


# 94a96fce 03-Mar-2016 Daniel Jasper <djasper@google.com>

clang-format: Use stable_sort when sorting #includes.

Otherwise, clang-format can output useless replacements in the presence
of identical #includes

llvm-svn: 262630


Revision tags: llvmorg-3.8.0
# abd1f574 02-Mar-2016 Daniel Jasper <djasper@google.com>

clang-format: [JS] Optionally re-quote string literals.

Turns "foo" into 'foo' (or vice versa, depending on configuration).
This makes it more convenient to follow the Google JavaScript style
guide:

clang-format: [JS] Optionally re-quote string literals.

Turns "foo" into 'foo' (or vice versa, depending on configuration).
This makes it more convenient to follow the Google JavaScript style
guide:
https://google.github.io/styleguide/javascriptguide.xml?showone=Strings#Strings

This functionality is behind the option "JavaScriptQuotes", which can be:

* "leave" (no re-quoting)
* "single" (change to single quotes)
* "double" (change to double quotes)

This also changes single quoted JavaScript string literals to be treated
as tok::string_literal, not tok::char_literal, which fixes two unrelated
tests.

Patch by Martin Probst. Thank you.

llvm-svn: 262534

show more ...


# b12e5a5c 01-Mar-2016 Manuel Klimek <klimek@google.com>

Add functions to apply replacements and reformat them.

This is a commonly useful feature to have, and we have implemented it
multiple times with different kinds of bugs. This implementation
centrali

Add functions to apply replacements and reformat them.

This is a commonly useful feature to have, and we have implemented it
multiple times with different kinds of bugs. This implementation
centralizes the idea in a set of functions that we can then use from the various
tools.

Reverts r262234, which is a revert of r262232, and puts the functions
into FOrmat.h, as they are closely coupled to clang-format, and we
otherwise introduce a cyclic dependency between libFormat and
libTooling.

Patch by Eric Liu.

llvm-svn: 262323

show more ...


Revision tags: llvmorg-3.8.0-rc3
# 2bc38701 22-Feb-2016 Daniel Jasper <djasper@google.com>

clang-format: [JS] Add @return to the supported JSDoc pragmas in Google
style.

llvm-svn: 261563


# 8cde3b4b 07-Feb-2016 Daniel Jasper <djasper@google.com>

clang-format: [JS] Support @see annotations in JSDoc comments in Google
style.

llvm-svn: 260057


Revision tags: llvmorg-3.8.0-rc2
# e1a7b763 01-Feb-2016 Daniel Jasper <djasper@google.com>

clang-format: Add option to disable string literal formatting.

llvm-svn: 259352


Revision tags: llvmorg-3.8.0-rc1
# e1f72a67 09-Jan-2016 Daniel Jasper <djasper@google.com>

clang-format: Fix the counting of leading whitespace in tok::unknown tokens

Previously, all whitespace characters would increase the starting
column, which doesn't make sense. This fixes a problem,

clang-format: Fix the counting of leading whitespace in tok::unknown tokens

Previously, all whitespace characters would increase the starting
column, which doesn't make sense. This fixes a problem, e.g. with the
length calculation in JS template strings.

llvm-svn: 257267

show more ...


# 88c16346 09-Jan-2016 Daniel Jasper <djasper@google.com>

Make clang::format::reformat work with non 0-terminated strings.

llvm-svn: 257259


# d196abbb 08-Jan-2016 Daniel Jasper <djasper@google.com>

clang-format: [JS] Add some Closure Compiler JSDoc tags to the default
Google configuration so that they aren't line-wrapped.

llvm-svn: 257159


# 498f558f 25-Dec-2015 Daniel Jasper <djasper@google.com>

clang-format: [TableGen] Support ;-less include lines.

llvm-svn: 256412


# b10423ad 22-Dec-2015 Nico Weber <nicolasweber@gmx.de>

Disable include sorting by default for Chromium style.

Include sorting generally can break .cc files, especially on Windows. Make
this opt-in for Chromium style to give us some more time to roll th

Disable include sorting by default for Chromium style.

Include sorting generally can break .cc files, especially on Windows. Make
this opt-in for Chromium style to give us some more time to roll this out.

(Given that the Google style guide is used by many companies, some of them
probably writing code on Windows, one could argue this should be opt-in in
general...)

llvm-svn: 256288

show more ...


# 72a1b6a5 22-Dec-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] "operator" is not a keyword in Java/JavaScript.

llvm-svn: 256245


# a252f5d5 21-Dec-2015 Daniel Jasper <djasper@google.com>

clang-format: Only consider the first #include that looks right to be
the main #include.

llvm-svn: 256170


# 41a2bf74 21-Dec-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] Change Google-style default for aligning operands.

The style guide allows both, but apparently, this is the more dominant use.

llvm-svn: 256154


# 32d75fa2 21-Dec-2015 Daniel Jasper <djasper@google.com>

clang-format: Only try to find the "main" include in the first block of
includes.

llvm-svn: 256153


# 0bfdeb4b 21-Dec-2015 Daniel Jasper <djasper@google.com>

clang-format: Extend detection of the "main" #include to use the filename

Before, the first (non-system) header in a file was considered to be
the main include. This is conservative as it makes clan

clang-format: Extend detection of the "main" #include to use the filename

Before, the first (non-system) header in a file was considered to be
the main include. This is conservative as it makes clang-format change
the #include order less often. Instead implement some basic usage of
the filename itself. With this patch, clang-format considers every
header to be a main include if the header file's basename is a prefix
to the filename the #include is in.

llvm-svn: 256148

show more ...


# 448592ee 18-Dec-2015 Zachary Turner <zturner@google.com>

Support AlwaysBreakAfterReturnType

This changes the behavior of AlwaysBreakAfterDeclarationReturnType
so that it supports breaking after declarations, definitions, or
both.

Differential Revision: h

Support AlwaysBreakAfterReturnType

This changes the behavior of AlwaysBreakAfterDeclarationReturnType
so that it supports breaking after declarations, definitions, or
both.

Differential Revision: http://reviews.llvm.org/D10370
Reviewed By: Daniel Jasper

llvm-svn: 256046

show more ...


# d2629dc8 16-Dec-2015 Daniel Jasper <djasper@google.com>

clang-format: Extend header sort category implementation.

Specifically, it is sometimes necessary to keep certain #includes as
the first #include, even before the main #include for a .cc file.
Switc

clang-format: Extend header sort category implementation.

Specifically, it is sometimes necessary to keep certain #includes as
the first #include, even before the main #include for a .cc file.
Switching the category to be signed instead of unsigned isn't ideal,
but it seems as good of an option as any and is fully backwards
compatible.

llvm-svn: 255757

show more ...


# e87f5cf4 14-Dec-2015 Daniel Jasper <djasper@google.com>

clang-format: Fix style default for WebKit and Linux styles.

Brought up in codereviews:
http://reviews.llvm.org/D15445
http://reviews.llvm.org/D15485

llvm-svn: 255484


# a0a5039d 01-Dec-2015 Daniel Jasper <djasper@google.com>

clang-format: Make it possible to turn off comment reflowing.

llvm-svn: 254414


Revision tags: llvmorg-3.7.1
# b68aabf7 23-Nov-2015 Daniel Jasper <djasper@google.com>

clang-format: Make moving of the Cursor work properly when sorting #includes.

llvm-svn: 253860


# 9b8c7c72 21-Nov-2015 Daniel Jasper <djasper@google.com>

clang-format: Make sorting includes respect // clang-format off

llvm-svn: 253772


Revision tags: llvmorg-3.7.1-rc2
# 09840efd 20-Nov-2015 Daniel Jasper <djasper@google.com>

clang-format: [JS] struct and union aren't keywords / reserved words.

llvm-svn: 253671


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