| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
/*bbbbbbbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb :
ccccccccccccccccccccccccccc;
After:
int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
/*bbbbbbbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb :
ccccccccccccccccccccccccccc;
llvm-svn: 259670
|
|
|
|
| |
llvm-svn: 259648
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
enum?: string
[];
After:
enum?: string[];
llvm-svn: 259628
|
|
|
|
|
|
| |
Patch by Matthew Whitehead, thank you.
llvm-svn: 259487
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RecursiveASTVisitor::TraverseFunctionHelper() traverses a function's
ParmVarDecls by going to the function's getTypeSourceInfo if it exists, and
`DEF_TRAVERSE_TYPELOC(FunctionProtoType` then goes to the function's
ParmVarDecls.
For a function template that doesn't have parameters that explicitly depend on
the template parameter, we used to be clever and not build a new
TypeSourceInfo. That meant that when an instantiation of such a template is
visited, its TypeSourceInfo would point to the ParmVarDecls of the template,
not of the instantiation, which then confused clients of RecursiveASTVisitor.
So don't be clever for function templates that have parameters, even if none of
the parameters depend on the type.
Fixes PR26257.
http://reviews.llvm.org/D16478
llvm-svn: 259428
|
|
|
|
|
|
| |
Patch by Richard Thomson.
llvm-svn: 259359
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes."
It didn't pass check-clang.
llvm-svn: 259218
|
|
|
|
|
|
|
|
| |
matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes.
Patch by Richard Thomson
llvm-svn: 259210
|
|
|
|
|
|
|
|
|
|
| |
runToolOnCodeWithArgs/buildASTFromCodeWithArgs.
This can be used as a way to modify argv[0] for a clang tool.
Differential Revision: http://reviews.llvm.org/D16718
llvm-svn: 259187
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For
void f() {
union { int i; };
}
clang used to omit the RecordDecl from the anonymous union from the AST.
That's because the code creating it only called PushOnScopeChains(), which adds
it to the current DeclContext, which here is the function's DeclContext. But
RecursiveASTVisitor doesn't descent into all decls in a FunctionDecl.
Instead, for DeclContexts that contain statements, return the RecordDecl so
that it can be included in the DeclStmt containing the VarDecl for the union.
Interesting bits from the AST before this change:
|-FunctionDecl
| `-CompoundStmt
| |-DeclStmt
| | `-VarDecl 0x589cd60 <col:3> col:3 implicit used 'union (anonymous at test.cc:3:3)' callinit
After this change:
-FunctionDecl
| `-CompoundStmt
| |-DeclStmt
| | |-CXXRecordDecl 0x4612e48 <col:3, col:18> col:3 union definition
| | | |-FieldDecl 0x4612f70 <col:11, col:15> col:15 referenced i 'int'
| | `-VarDecl 0x4613010 <col:3> col:3 implicit used 'union (anonymous at test.cc:3:3)' callinit
This is now closer to how anonymous struct and unions are represented as
members of structs. It also enabled deleting some one-off code in the
template instantiation code.
Finally, it fixes a crash with ASTMatchers, see the included test case
(this fixes http://crbug.com/580749).
llvm-svn: 259079
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Differential revision: http://reviews.llvm.org/D16567
llvm-svn: 258836
|
|
|
|
|
|
| |
Patch by Jonathan Coe.
llvm-svn: 258573
|
|
|
|
|
|
|
|
|
|
|
|
| |
An implicit copy ctor creates loop VarDecls that hang off CXXCtorInitializer.
RecursiveASTVisitor used to not visit them, so that they didn't show up in the
parent map used by ASTMatchers, causing asserts() when the implicit
DeclRefExpr() in a CXXCtorInitializer referred to one of these VarDecls.
Fixes PR26227.
http://reviews.llvm.org/D16413
llvm-svn: 258503
|
|
|
|
| |
llvm-svn: 258500
|
|
|
|
|
|
| |
http://reviews.llvm.org/D16394
llvm-svn: 258415
|
|
|
|
|
|
| |
Patch by Aleksei Sidorin.
llvm-svn: 258322
|
|
|
|
|
|
| |
Patch by Adrian Zgorzałek.
llvm-svn: 258321
|
|
|
|
|
|
|
|
|
|
| |
Before:
a[ ::b::c];
After:
a[::b::c];
llvm-svn: 258123
|
|
|
|
| |
llvm-svn: 258077
|
|
|
|
|
|
| |
Patch by Jonathan Coe.
llvm-svn: 258072
|
|
|
|
|
|
| |
EXPECT_TRUE instead of EXPECT_FALSE. Adds a matcher test to ensure that static member functions are properly handled. Generates the documentation from the matcher.
llvm-svn: 258070
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new matcher allows users to provide a matcher for both the argument
of a CallExpr/CxxConstructExpr a well as the ParmVarDecl of the
argument.
Patch by Felix Berger.
Differential Revision: http://reviews.llvm.org/D13845
llvm-svn: 258042
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaa[bbbb]
.cccc();
After:
aaaa[bbbb].cccc();
llvm-svn: 257763
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang-format only works for JavaScript code, if all the semicolons are
present anyway, so this linebreak can never be desired.
Before (with appropriate statement lengths or column limit):
return
[ aaa ];
After:
return [
aaaa
];
llvm-svn: 257741
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After reading the style guides again, they don't actually say how to
pack or not pack array literals. Based on some user reports, array
initializers can unnecessarily get quite long if they contain many
small elements. Array literals with trailing commas are still formatted
one per line so that users have a way to opt out of the packing.
Before:
var array = [
aaaaaa,
aaaaaa,
aaaaaa,
aaaaaa,
aaaaaa,
aaaaaa,
aaaaaa,
aaaaaa,
aaaaaa,
aaaaaa
];
After:
var array = [
aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa,
aaaaaa, aaaaaa
];
llvm-svn: 257615
|
|
|
|
|
|
| |
Patch by Adrian Zgorzałek
llvm-svn: 257521
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
export abstract class X {y: number;}
(and all sorts of other havoc in more complicated cases).
After:
export abstract class X { y: number; }
llvm-svn: 257451
|
|
|
|
| |
llvm-svn: 257406
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As soon as a comment had whitespace changes inside of the token, we
couldn't identify the whole comment as a trailing comment anymore and
alignment stopped working. Add a new boolean to Change for this special
case and fix trailing comment identification to use it.
This also changes WhitespaceManager to sum the length of all Changes
inside of a token into the first Change.
Before this fix
int xy; // a
int z; //b
became
int xy; // a
int z; // b
with this patch we immediately get to:
int xy; // a
int z; // b
Differential Revision: http://reviews.llvm.org/D16058
llvm-svn: 257341
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaaaaaaaaaaaaaaaaaaaa operator,(aaaaaaaaaaaaaaaaaaaaa &
aaaaaaaaaaaaaaaaaaaaaaaaaa) const;
After:
aaaaaaaaaaaaaaaaaaaaaa operator,(
aaaaaaaaaaaaaaaaaaaaa &aaaaaaaaaaaaaaaaaaaaaaaaaa) const;
llvm-svn: 257330
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r257257 change the way clang-format enforces line breaks after a
templated type has been line-wrapped. This was to fix an incorrect line
break if BinPackParameters is set to false. However, it also leads to
an unwanted line break in a different case. Thus, for now, only do this
when BinPackParameters is false. This isn't ideal yet, but helps us
until we have a better solution.
With BinPackParameters:
Before:
void fffffffffff(aaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaa> aaaaaaaaaa);
After:
void fffffffffff(
aaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaa>
aaaaaaaaaa);
llvm-svn: 257325
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
return [
aaaaaaaaaaaaaaaaaaaaaa
].aaaaaaa(function() {
//
})
.bbbbbb();
After:
return [aaaaaaaaaaaaaaaaaaaaaa]
.aaaaaaa(function() {
//
})
.bbbbbb();
llvm-svn: 257324
|
|
|
|
|
|
| |
No functional change intended.
llvm-svn: 257287
|
|
|
|
| |
llvm-svn: 257286
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
FixedCompilationDatabase sets the working dir to "." by default. For
chdir(".") this is a noop but this lead to InMemoryFileSystem to create
bogus paths. Fixes PR25327.
llvm-svn: 257260
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting here:
int x; // Format this line only.
int xx; //
int xxxxx; //
Before:
int x; // Format this line only.
int xx; //
int xxxxx; //
After:
int x; // Format this line only.
int xx; //
int xxxxx; //
llvm-svn: 257258
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa,
vector<int>
bbbbbbbbbbbbbbb);
After:
void aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa,
vector<int> bbbbbbbbbbbbbbb);
llvm-svn: 257257
|
|
|
|
|
|
|
|
|
|
| |
Before:
bool operator, ();
After:
bool operator,();
llvm-svn: 257256
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
var x: {
a: string;
b: number;
}
= {};
After:
var x: {a: string; b: number;} = {};
llvm-svn: 257255
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
over wrapping before parameters.
Before:
function someFunc(
args: string[]): {longReturnValue: string[]} {}
After:
function someFunc(args: string[]):
{longReturnValue: string[]} {}
llvm-svn: 257162
|
|
|
|
|
|
| |
Google configuration so that they aren't line-wrapped.
llvm-svn: 257159
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
foo = class {
constructor() {}
}
;
After:
foo = class {
constructor() {}
};
llvm-svn: 257154
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before (example is JS, but also applies to C++):
return [
aaaa()
.bbbbbbbb('A'),
aaaa().bbbbbbbb('B'),
aaaa().bbbbbbbb('C'),
];
After:
return [
aaaa().bbbbbbbb('A'),
aaaa().bbbbbbbb('B'),
aaaa().bbbbbbbb('C'),
];
llvm-svn: 257079
|