| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
key in Obj-C dictionary literals
This fixes: https://llvm.org/PR22647
Patch by Kent Sutherland. Thank you.
llvm-svn: 250010
|
|
|
|
|
|
|
|
|
| |
Slashes in regular expressions do not need to be escaped and do not
terminate the regular expression even without a preceding backslash.
Patch by Martin Probst. Thank you.
llvm-svn: 250009
|
|
|
|
| |
llvm-svn: 249846
|
|
|
|
|
|
| |
This simplifies the code and gets us support for .. for free.
llvm-svn: 249830
|
|
|
|
|
|
| |
This lets a VFSified driver actually validate the GCC paths.
llvm-svn: 249829
|
|
|
|
|
|
|
|
|
|
| |
This means file remappings can now be managed by ClangTool (or a
ToolInvocation user) instead of by ToolInvocation itself. The
ToolInvocation remapping is still in place so users can migrate.
Differential Revision: http://reviews.llvm.org/D13474
llvm-svn: 249815
|
|
|
|
| |
llvm-svn: 249693
|
|
|
|
|
|
| |
Patch by Jan Vesely!
llvm-svn: 249608
|
|
|
|
|
|
|
| |
There are still some loose ends here but it's sufficient so we can detect
GCC headers that are inside of a VFS.
llvm-svn: 249556
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes this bug: https://llvm.org/bugs/show_bug.cgi?id=24504
TokenAnnotator::spaceRequiredBetween was handling TT_ForEachMacro but
not TT_ObjCForIn, so lines that look like:
for (id nextObject in (NSArray *)myArray)
would incorrectly turn into:
for (id nextObject in(NSArray *)myArray)
Patch by Kent Sutherland, thank you.
llvm-svn: 249553
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aligning assignments.
This was done correctly when aligning the declarations, but not when
aligning assignments.
FIXME: The code between assignments and declarations alignment is
roughly duplicated and
would benefit from factorization.
Bug 25090: https://llvm.org/bugs/show_bug.cgi?id=25090
Patch by Beren Minor. Thank you.
llvm-svn: 249552
|
|
|
|
|
|
| |
Otherwise we won't be able to find them later.
llvm-svn: 249525
|
|
|
|
|
|
| |
This fixes llvm.org/PR25073.
llvm-svn: 249519
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
inline A operator^(const A &lhs, const A &rhs) {} int i;
After:
inline A operator^(const A &lhs, const A &rhs) {}
int i;
llvm-svn: 249517
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void f(Type(¶meter)[10]) {}
void f(Type (*parameter)[10]) {}
After:
void f(Type (¶meter)[10]) {}
void f(Type (*parameter)[10]) {}
llvm-svn: 249502
|
|
|
|
|
|
|
|
|
|
| |
Before:
return options != nullptr &&operator==(*options);
After:
return options != nullptr && operator==(*options);
llvm-svn: 249501
|
|
|
|
|
|
|
|
|
|
| |
minor cleanups
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D13406
llvm-svn: 249484
|
|
|
|
|
|
| |
more like a real FS.
llvm-svn: 249409
|
|
|
|
|
|
| |
Both "x86" and "x86-64" are incompatible to triple's arch.
llvm-svn: 249403
|
|
|
|
|
|
| |
investigating.
llvm-svn: 249395
|
|
|
|
|
|
|
|
|
| |
This was made much easier by introducing an IncludeCategory struct to
replace the previously used std::pair.
Also, cleaned up documentation and added examples.
llvm-svn: 249392
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds `addTargetAndModeForProgramName`, a utility function that will add
appropriate `-target foo` and `--driver-mode=g++` tokens to a command
line for driver invocations of the form `a/b/foo-g++`. It is intended to
support tooling: for example, should a compilation database record some
invocation of `foo-g++` without these implicit flags, a Clang tool may
use this function to add them back.
Patch by Luke Zarko.
llvm-svn: 249391
|
|
|
|
|
|
|
|
|
|
|
| |
Apart from being cleaner this also means that clang-format no longer has
access to the host file system. This isn't necessary because clang-format
never reads includes :)
Includes minor tweaks and bugfixes found in the VFS implementation while
running clang-format tests.
llvm-svn: 249385
|
|
|
|
|
|
| |
No idea what asymmetry MSVC is findind.
llvm-svn: 249346
|
|
|
|
| |
llvm-svn: 249341
|
|
|
|
|
|
| |
and documentation.
llvm-svn: 249321
|
|
|
|
|
|
|
|
|
|
|
|
| |
For RealFileSystem this is getcwd()/chdir(), the synthetic file systems can
make up one for themselves. OverlayFileSystem now synchronizes the working
directories when a new FS is added to the overlay or the overlay working
directory is set. This allows purely artificial file systems that have zero
ties to the underlying disks.
Differential Revision: http://reviews.llvm.org/D13430
llvm-svn: 249316
|
|
|
|
|
|
|
|
|
|
| |
This is a simple file system tree of memory buffers that can be filled by a
client. In conjunction with an OverlayFS it can be used to make virtual
files accessible right next to physical files. This can be used as a
replacement for the virtual file handling in FileManager and which I intend
to remove eventually.
llvm-svn: 249315
|
|
|
|
|
|
|
| |
This streamlines the interface a bit and makes Status more immutable.
No functional change intended.
llvm-svn: 249310
|
|
|
|
| |
llvm-svn: 249260
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows clang-format to align identifiers in consecutive
declarations. This is useful for increasing the readability of the code
in the same way the alignment of assignations is.
The code is a slightly modified version of the consecutive assignment
alignment code. Currently only the identifiers are aligned, and there is
no support of alignment of the pointer star or reference symbol.
The patch also solve the issue of alignments not being possible due to
the ColumnLimit for both the existing AlignConsecutiveAligments and the
new AlignConsecutiveDeclarations.
Patch by Beren Minor, thank you.
Review: http://reviews.llvm.org/D12362
llvm-svn: 248999
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
control the individual braces. The existing choices for brace wrapping
are now merely presets for the different flags that get expanded upon
calling the reformat function.
All presets have been chose to keep the existing formatting, so there
shouldn't be any difference in formatting behavior.
Also change the dump_format_style.py to properly document the nested
structs that are used to keep these flags discoverable among all the
configuration flags.
llvm-svn: 248802
|
|
|
|
|
|
|
|
|
| |
Recognize the main module header as well as different #include categories.
This should now mimic the behavior of llvm/utils/sort_includes.py as
well as clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp very
closely.
llvm-svn: 248782
|
|
|
|
|
|
|
|
|
| |
JavaScript allows keywords to appear in IdenfierName positions, e.g.
fields, or object literal members, but not as plain identifiers.
Patch by Martin Probst. Thank you!
llvm-svn: 248714
|
|
|
|
|
|
| |
Patch by Martin Probst. Thank you!
llvm-svn: 248713
|
|
|
|
|
|
|
|
|
| |
To implement this nicely, add a function that merges two sets of
replacements that are meant to be done in sequence. This functionality
will also be useful for other applications, e.g. formatting the result
of clang-tidy fixes.
llvm-svn: 248367
|
|
|
|
|
|
|
|
|
|
|
| |
that they were provided in the JSON file.
This is useful for debugging of issues and reduction of test cases.
For example, an issue may show up due to the order that some commands were processed.
It is convenient to be able to remove commands from the file and still preserve the order
that they are returned, instead of getting a completely different order when removing a few commands.
llvm-svn: 248292
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It wasn't correctly handling this case:
int oneTwoThree = 123;
int oneTwo = 12;
method();
Review: http://reviews.llvm.org/D12369
Patch by Beren Minor. Thank you!
llvm-svn: 248254
|
|
|
|
|
|
|
|
| |
This fixes llvm.org/PR24877.
Patch by Benjamin Daly, thank you!
llvm-svn: 248145
|
|
|
|
|
|
| |
rename also splits recordDecl() (which used to match CXXRecordDecl) into recordDecl() (that matches RecordDecl) and cxxRecordDecl (that matches CXXRecordDecl). Also adds isStruct(), isUnion(), and isClass() narrowing matchers for RecordDecl objects.
llvm-svn: 247885
|
|
|
|
| |
llvm-svn: 247832
|
|
|
|
| |
llvm-svn: 247752
|
|
|
|
|
|
| |
Before: assert a&& b;
Now: assert a && b;
llvm-svn: 247750
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
possible. Added objcObjectPointerType(), objcInterfaceDecl(), templateTypeParmType(), injectedClassNameType(), and unresolvedUsingTypenameDecl(). Updated documentation for pointerType() to call out that it does not match ObjCObjectPointerType types. Changed pointsTo() to handle ObjCObjectPointerType as well as PointerType.
While this may seem like a lot of unrelated changes, they all relate back to fixing HasDeclarationMatcher.
This now allows us to write a matcher like:
varDecl(hasType(namedDecl(hasName("Foo"))))
that matches code using typedefs, objc interfaces, template type parameters, injected class names, or unresolved using typenames.
llvm-svn: 247404
|
|
|
|
|
|
|
| |
Brings tool start time for a large synthetic test case down from (on my
machine) 4 seconds to 0.5 seconds.
llvm-svn: 247018
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the documentation for numSelectorArgs includes an incorrect
example. It shows a case where an argument of 1 will match a property
getter, but a getter will be matched only when N == 0.
This diff corrects the documentation and adds a test for numSelectorArgs(0).
Patch by Dave Lee.
llvm-svn: 246998
|
|
|
|
|
|
| |
structs or unions.
llvm-svn: 246860
|
|
|
|
| |
llvm-svn: 246322
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
Constructor() : initializer(0) {}
template <typename T>
Constructor()
: initializer(0) {}
After:
Constructor() : initializer(0) {}
template <typename T>
Constructor() : initializer(0) {}
llvm-svn: 246146
|
|
|
|
| |
llvm-svn: 246037
|