| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch corresponds to review:
http://reviews.llvm.org/D15120
It adds support for the __float128 keyword, literals and a target feature to
enable it. This support is disabled by default on all targets and any target
that has support for this type is free to add it.
Based on feedback that I've received from target maintainers, this appears to
be the right thing for most targets. I have not heard from the maintainers of
X86 which I believe supports this type. I will subsequently investigate the
impact of enabling this on X86.
llvm-svn: 266186
|
|
|
|
|
|
|
|
| |
This should've been forwards from rbegin(), reverse iterators are just
too confusing to be used by mere mortals. Fixes out-of-bounds walks over
the list.
llvm-svn: 265934
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: djasper
Subscribers: klimek
Differential Revision: http://reviews.llvm.org/D18943
llvm-svn: 265916
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
#define A \
if (a) \
label: \
f()
After:
#define A \
if (a) \
label: \
f()
llvm-svn: 265557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While I am not personally convinced about the usefulness of this
construct, we should break it.
Before:
if (a) label:
f();
After:
if (a)
label:
f();
llvm-svn: 265545
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
MACRO(
abc).function() // wrap
<< abc;
After:
MACRO(abc).function() // wrap
<< abc;
llvm-svn: 265540
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
auto x = (X) this;
After:
auto x = (X)this;
This fixes llvm.org/PR27198.
llvm-svn: 265385
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
formatAndApplyAllReplacements takes a set of Replacements, applies them on a
Rewriter, and reformats the changed code.
Reviewers: klimek, djasper
Subscribers: ioeric, klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D17852
llvm-svn: 264745
|
|
|
|
|
|
| |
platform-related test case for MS compilers to avoid breaking buildbot.
llvm-svn: 264277
|
|
|
|
|
|
| |
This reverts commit r264253. It is breaking the buildbot http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/2203
llvm-svn: 264276
|
|
|
|
|
|
| |
This reverts commit r264254.
llvm-svn: 264275
|
|
|
|
|
|
| |
This reverts commit r264253. It is breaking the buildbot http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/2203
llvm-svn: 264257
|
|
|
|
|
|
| |
This reverts commit r264254.
llvm-svn: 264256
|
|
|
|
| |
llvm-svn: 264254
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously, format::getStyle assumes that the given file resides in
the real file system, which prevents the use of virtual file system in testing etc.
This patch adds a parameter in format::getStyle interface so that users can specify
the right file system. By default, the file system is the real file system.
Reviewers: djasper, klimek
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D18399
llvm-svn: 264253
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Test commit access to clang repo.
Reviewers: cfe-commits
Subscribers: klimek
Differential Revision: http://reviews.llvm.org/D18432
llvm-svn: 264252
|
|
|
|
|
|
|
|
|
| |
"import ... from '...';" and "export ... from '...';" should be treated
the same as goog.require/provide/module/forwardDeclare calls.
Patch by Martin Probst.
llvm-svn: 264055
|
|
|
|
|
|
|
|
|
| |
The operators | and & in types, as opposed to the bitwise operators,
should not have whitespace around them (e.g. `Foo<Bar|Baz>`).
Patch by Martin Probst. Thank you.
llvm-svn: 263961
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
change affected ranges.
llvm-svn: 263713
|
|
|
|
|
|
|
|
|
|
| |
Before:
x.of ();
After:
x.of();
llvm-svn: 263710
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a call takes a single argument, using AlwaysBreak can lead to lots
of wasted lines and additional indentation without improving the
readability in a significant way.
Before:
caaaaaaaaaaaall(
caaaaaaaaaaaall(
caaaaaaaaaaaall(
caaaaaaaaaaaaaaaaaaaaaaall(aaaaaaaaaaaaaa, aaaaaaaaa))));
After:
caaaaaaaaaaaall(caaaaaaaaaaaall(caaaaaaaaaaaall(
caaaaaaaaaaaaaaaaaaaaaaall(aaaaaaaaaaaaaa, aaaaaaaaa))));
llvm-svn: 263709
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automatic Semicolon Insertion can only be properly handled by parsing
source code. However conservatively catching just a few, common
situations prevents breaking code during development, which greatly
improves usability.
JS code should still use semicolons, and ASI code should be flagged by
a compiler or linter.
Patch by Martin Probst. Thank you.
llvm-svn: 263470
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
for (let { a, b } of x) {
}
After:
for (let {a, b} of x) {
}
llvm-svn: 262776
|
|
|
|
|
|
|
| |
Otherwise, clang-format can output useless replacements in the presence
of identical #includes
llvm-svn: 262630
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Patch by Erik Kessler, thank you.
llvm-svn: 262402
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ternary expressions.
Before:
return aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? aaaaa : bbbbbbbbbbbbbbb +
cccccccccccccccc;
After:
return aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
aaaaa :
bbbbbbbbbbbbbbb + cccccccccccccccc;
llvm-svn: 262293
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaaaaaaaaaaaa]
[a].aaaaaaaaaaaaaaaaaaaaaa();
After:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaaaaaaaaaaaa][a]
.aaaaaaaaaaaaaaaaaaaaaa();
llvm-svn: 262292
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
var x = {
a: a,
b: b, 'c': c,
};
After:
var x = {
a: a,
b: b,
'c': c,
};
llvm-svn: 262291
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change:
SomeFunction(
[] {
int i;
return i; // Format this line.
},
[] {
return 2; // Don't "fix" this.
});
llvm-svn: 262216
|
|
|
|
|
|
| |
style.
llvm-svn: 261563
|
|
|
|
|
|
| |
Patch by Martin Probst. Thank you.
llvm-svn: 261528
|
|
|
|
|
|
|
|
|
|
| |
Before:
for (var i of[2, 3]) {}
After:
for (var i of [2, 3]) {}
llvm-svn: 260518
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa)
<< aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa)
<< aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
<< aaa;
After:
Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa)
<< aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa)
<< aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
<< aaa;
llvm-svn: 260517
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular, make it more expensive than breaking after the return
type of a function definition/declaration.
Before:
template <typename T>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaa<
T>::aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaa);
After:
template <typename T>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa<T>::aaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaa);
llvm-svn: 260497
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
bbbbbbbbbbbb(aaaaaaaaaaaaaaaaaaaaaaaa, //
ccccccc(aaaaaaaaaaaaaaaaa, //
b));
After:
bbbbbbbbbbbb(aaaaaaaaaaaaaaaaaaaaaaaa, //
ccccccc(aaaaaaaaaaaaaaaaa, //
b));
This fixes llvm.org/PR24905.
llvm-svn: 260080
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
f({a},
() => {
g(); //
});
After:
f({a}, () => {
g(); //
});
llvm-svn: 260060
|
|
|
|
|
|
| |
style.
llvm-svn: 260057
|
|
|
|
|
|
|
|
|
|
| |
Before:
f(a.operator() < A > ());
After:
f(a.operator()<A>());
llvm-svn: 259884
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
/*bbbbbbbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb :
ccccccccccccccccccccccccccc;
After:
int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
/*bbbbbbbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb :
ccccccccccccccccccccccccccc;
llvm-svn: 259670
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
enum?: string
[];
After:
enum?: string[];
llvm-svn: 259628
|
|
|
|
|
|
| |
Patch by Matthew Whitehead, thank you.
llvm-svn: 259487
|
|
|
|
|
|
|
|
|
|
|
|
| |
initializers.
Before:
Constructor() : member([](A *a, B * b) {}) {}
After:
Constructor() : member([](A *a, B *b) {}) {}
llvm-svn: 259353
|
|
|
|
| |
llvm-svn: 259352
|
|
|
|
| |
llvm-svn: 259351
|
|
|
|
| |
llvm-svn: 259350
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@Annotation("Some"
+ " text")
List<Integer>
list;
After:
@Annotation("Some"
+ " text")
List<Integer> list;
llvm-svn: 258981
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"This is the way [autoconf] ends
Not with a bang but a whimper."
-T.S. Eliot
Reviewers: chandlerc, grosbach, bob.wilson, echristo
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D16472
llvm-svn: 258862
|