summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs
Commit message (Collapse)AuthorAgeFilesLines
* clang-format-vs : Fix Unicode formattingHans Wennborg2019-11-271-11/+20
| | | | | | | | | | | | | | | | Use UTF-8 for communication with clang-format and convert the replacements offset/length to characters position/count. Internally VisualStudio.Text.Editor.IWpfTextView use sequence of Unicode characters encoded using UTF-16 and use characters position/count for manipulating text. Resolved "Error while running clang-format: Specified argument was out of the range of valid values. Parameter name: replaceSpan". Patch by empty2fill! Differential revision: https://reviews.llvm.org/D70633
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Update some code used in our visual studio plugins to use linux fileChandler Carruth2019-01-191-456/+456
| | | | | | | | endings. We already used them in some cases, and this makes things consistent. This will also simplify updating the licenses in these files. llvm-svn: 351632
* clang-format plugin: Add missing semicolon in list of file extensions (PR36383)Hans Wennborg2018-02-201-1/+1
| | | | llvm-svn: 325566
* clang-format plugin: Add missing NL (new line) at EOF (end of file)Hans Wennborg2017-09-221-0/+6
| | | | | | | | | | | | clang-format.exe removes trailing new lines at end of file. However, if no NL is found at EOF one should be added. Patch by Teodor MICU! Differential Revision: https://reviews.llvm.org/D37732 llvm-svn: 314033
* clang-format-vsix: Add "Format on Save" featureAntonio Maiorano2017-04-051-90/+102
| | | | | | | | | | | This change adds a feature to the clang-format VS extension that optionally enables the automatic formatting of documents when saving. Since developers always need to save their files, this eases the workflow of making sure source files are properly formatted. Differential Revision: https://reviews.llvm.org/D29221 llvm-svn: 299543
* clang-format-vsix: add command to format documentAntonio Maiorano2016-12-161-13/+79
| | | | | | | | Bound to Ctrl+R, Ctrl+D by default. Also added section on how to debug the extension to the Readme. Differential Revision: https://reviews.llvm.org/D27501 llvm-svn: 289910
* clang-format sort include use the source file name to determine theDaniel Jasper2016-02-101-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "main include" that will be the 1st include (category 0). Because the clang-format visual studio extension does not pass the file name and use the standard input, sort include cannot find a "main include": Testing fix on llvm\tools\clang\lib\Format\Format.cpp: Original file: #include "clang/Format/Format.h" ... #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" Without fix, selecting the includes and running visual studio clang-format: ... #include "clang/Basic/SourceManager.h" #include "clang/Format/Format.h" #include "clang/Lex/Lexer.h" With fix, selecting the includes and running visual studio clang-format: #include "clang/Format/Format.h" ... #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" Test 2 with main header not at the start: Original file: ... #include "clang/Format/Format.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" Without fix, selecting the includes and running visual studio clang-format: ... #include "clang/Basic/SourceManager.h" #include "clang/Format/Format.h" #include "clang/Lex/Lexer.h" With fix, selecting the includes and running visual studio clang-format: #include "clang/Format/Format.h" ... #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" Patch by Jean-Philippe Dufraigne, thank you. Review: http://reviews.llvm.org/D16524 llvm-svn: 260378
* Added new options to ClangFormat VSIX package.Marek Kurdej2015-10-191-5/+140
| | | | | | | | | | | | | | | | | | | Summary: Added new options to ClangFormat VSIX package: * fallback-style * assume-filename * sort-includes. Changed version to 1.1 (otherwise one couldn't update). Fixed clang-format escaping of XML reserved characters. Reviewers: hans, aaron.ballman, klimek, rnk, zturner Subscribers: djasper, cfe-commits Differential Revision: http://reviews.llvm.org/D13549 llvm-svn: 250694
* ClangFormatPackage.cs: fix inconsistent line endingsHans Wennborg2013-12-021-1/+1
| | | | llvm-svn: 196131
* clang-format vs plugin: use Alp's suggestion for getting the pathHans Wennborg2013-12-021-2/+2
| | | | llvm-svn: 196124
* clang-format vs plugin: bake clang-format.exe into the vsixHans Wennborg2013-12-021-1/+5
| | | | | | | | | | | This makes the clang-format plugin self-contained. Instead of requiring clang-format.exe to be available on the PATH, this includes it in the plugin's installer (.vsix file) and runs it from the install directory. Differential Revision: http://llvm-reviews.chandlerc.com/D2281 llvm-svn: 196122
* Allow _clang-format as alternative to .clang-format config filenameHans Wennborg2013-09-101-3/+4
| | | | | | | | | | | Dotfiles are impractical on Windows. This makes clang-format search for the style configuration file as '_clang-format' in addition to the usual '.clang-format'. This is similar to how VIM searches for '_vimrc' on Windows. Differential Revision: http://llvm-reviews.chandlerc.com/D1629 llvm-svn: 190413
* Make error text if clang-format is not on the system PATH more helpful,Manuel Klimek2013-09-051-1/+10
| | | | | | | as this is going to be a common mistake (installing LLVM defaults to not putting the tools onto the PATH). llvm-svn: 190036
* Adds a VSPackage project that builds a VS extension to run clang-format over ↵Manuel Klimek2013-09-041-0/+210
a selection / the line at the cursor. llvm-svn: 189955
OpenPOWER on IntegriCloud