summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-format/ClangFormat.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove clang-format from clang-tools-extra.Daniel Jasper2013-03-201-152/+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
* 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
* Let clang-format binary use same LangOpts as test.Daniel Jasper2013-01-101-6/+1
| | | | llvm-svn: 172066
* 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
* 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
* First version of a command line clang-format tool.Daniel Jasper2012-12-051-0/+84
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