summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-format
Commit message (Collapse)AuthorAgeFilesLines
* Remove clang-format from clang-tools-extra.Daniel Jasper2013-03-205-368/+0
| | | | llvm-svn: 177504
* Remove superseeded option.Daniel Jasper2013-02-061-9/+0
| | | | | | | | | The -invert-pointer-binding option will be superseeded by my next cfe-commit. Instead of explicitly overwriting this flag, clang-format can then be configured to auto-detect certain style-options based on the input file. llvm-svn: 174503
* Add xml:space='preserve' in order to correctly preserve whitespace.Manuel Klimek2013-02-061-1/+1
| | | | llvm-svn: 174502
* Kick JSON output for XML output.Manuel Klimek2013-02-061-14/+9
| | | | | | | | | | | | | | | | | | Apparently the owners of the tools we want to integrate with (eclipse in this case) don't have JSON parsers. The output now is: <replacements> <replacement offset='2' length='3'> </replacement> ... </replacements> Kicking JSON for now - it's easy enough to get back in when we need it. FIXME: once we find this useful enough, we might want to add it as free-standing functions to tooling. llvm-svn: 174497
* Adds JSON output for replacements, to simplify tools integration.Manuel Klimek2013-02-051-15/+36
| | | | | | | | | | | | | | | | | | | | | | | | Using -output-replacements will now output the replacements instead of the changed code. This allows easier integration with tools that need full control over what changed. The format is an array of objects with the members "offset" (number), "length" (number) and "replacement_text" (string), for example: [ { "offset": 42, "length": 5, "replacement_text": " " }, { "offset": 105, "length": 4, "replacement_text": "" } ] llvm-svn: 174382
* Implements support for specifying multiple ranges.Manuel Klimek2013-02-051-13/+23
| | | | | | | | | | | This is backwards compatible with earlier integrations. Also adds a basic test and a test for the ranges integration. You can now run: clang-format -offset=42 -length=15 -offset=150 -length=22 To re-format the ranges (42, +15) and (150, +22). llvm-svn: 174378
* Don't touch unchanged file for in-place edit.Daniel Jasper2013-01-301-0/+3
| | | | | | This fixes llvm.org/PR15087. llvm-svn: 173919
* these need the bitcode reader as well.Chris Lattner2013-01-191-1/+1
| | | | llvm-svn: 172908
* Introduce llvm::sys::PrintStackTraceOnErrorSignal()NAKAMURA Takumi2013-01-181-0/+2
| | | | llvm-svn: 172821
* Add temporary option to invert the */& binding in a specific style.Daniel Jasper2013-01-151-8/+17
| | | | | | | This is temporarily necessary until styles are configurable through files as it seems to be a contentious issue. llvm-svn: 172546
* Add support for Chromium style.Daniel Jasper2013-01-141-3/+12
| | | | llvm-svn: 172432
* Fix: correct file name in diagnostics.Alexander Kornienko2013-01-141-4/+5
| | | | llvm-svn: 172405
* Remove FIXME fixed by djasper in r172066.Nico Weber2013-01-101-1/+0
| | | | llvm-svn: 172097
* Format what you can when errors are foundAlexander Kornienko2013-01-101-10/+11
| | | | llvm-svn: 172075
* Improved clang-format integration support for diagnostic messages outputAlexander Kornienko2013-01-101-1/+6
| | | | llvm-svn: 172072
* Let clang-format binary use same LangOpts as test.Daniel Jasper2013-01-101-6/+1
| | | | llvm-svn: 172066
* Fix commentAlex Rosenberg2013-01-101-1/+1
| | | | llvm-svn: 172042
* Simplify reversed for-loop.Daniel Jasper2013-01-091-4/+2
| | | | llvm-svn: 171998
* Initial version of diff/patch-reformat tool.Daniel Jasper2013-01-091-0/+117
| | | | | | Use at your own risk :-). llvm-svn: 171994
* Implements the features requested in PR14679.Manuel Klimek2013-01-081-7/+36
| | | | | | | | | - adds '-h' as an alias for '-help'. - adds an optional <file> argument - adds an option -i to in-place edit the given file - adds a help text to explain what the tool does llvm-svn: 171858
* Enabled ObjC2 in clang-format for @package. Matches r171766.Nico Weber2013-01-071-0/+1
| | | | llvm-svn: 171767
* Set LangOpts.ObjC1 to 1 in clang-format.Nico Weber2013-01-071-0/+1
| | | | | | | | This matches the test change done in clang at r171742. Without this, clang-format would strip '@' characters and format e.g. '@interface' as 'interface'. llvm-svn: 171743
* Make clang-format binary understand C++11.Daniel Jasper2013-01-071-0/+2
| | | | llvm-svn: 171736
* Handle segfaults in clang-format vim-integration.Daniel Jasper2013-01-041-1/+3
| | | | | | | | | A segfault used to clear the entire buffer. With this change, a message to report a bug is displayed instead. This should solve most cases similar to llvm.org/PR14774. llvm-svn: 171480
* Fix the sorting of the #include lines in these tools.Chandler Carruth2013-01-021-1/+1
| | | | | | This is done with the script in llvm/utils/sort_includes.py llvm-svn: 171365
* Teach the extras repository to actually install the clang-format tool.Chandler Carruth2012-12-271-0/+4
| | | | | | | | | | We should also install the clang-format.py script somewhere that makes since for a Vim integration script. I don't know where that is though, so just installing the binary for now. This is enough to let me use the script from a checkout combined with the installed (and thus less likely to crash or be slow) clang-format binary. llvm-svn: 171164
* Basic clang-format vim-integration.Daniel Jasper2012-12-051-0/+52
| | | | | | File contains installation and usage instructions. llvm-svn: 169421
* Fix make build (hopefully).Daniel Jasper2012-12-051-3/+3
| | | | llvm-svn: 169371
* First version of a command line clang-format tool.Daniel Jasper2012-12-053-0/+121
Reads a single source range (offset, length) as well as the style guide as parameters and then reformats everything it receives from stdin. llvm-svn: 169364
OpenPOWER on IntegriCloud