summaryrefslogtreecommitdiff
path: root/tools/clang-format-vs
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2018.Paul Robinson2018-06-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334936 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format plugin: Add missing semicolon in list of file extensions (PR36383)Hans Wennborg2018-02-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325566 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314033 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format-vs: Update the VSIX ID.Hans Wennborg2017-09-121-1/+1
| | | | | | | | We're moving the extension to a new account on the VS Marketplace, and apparently it's not possible to re-upload an extension with an existing ID on a new account. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313060 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format-vs licence.txt: drop svn:executableHans Wennborg2017-04-131-0/+0
| | | | | | | Not sure how it ended up with that property in the first place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300245 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow-up to r300225: update ClangFormat.csproj tooHans Wennborg2017-04-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300231 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow-up to r300225: update ClangFormat.sln to VS2017Hans Wennborg2017-04-131-2/+2
| | | | | | This got lost in the previous patch somehow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300226 91177308-0d34-0410-b5e6-96231b3b80d8
* Warning-free clang-format plugin install for VS 15.0Hans Wennborg2017-04-133-81/+24
| | | | | | | | | | | | | | | | | | | | With the new release of VS, it's required that all plugins migrate to the new VSIX manifest format. The new format is backwards compatible with all versions newer that Visual Studio 2012, so this migration effectively drops support for older versions of the IDE. It's also required that these new extensions are built with Visual Studio 2017, so unfortunately it was necessary to migrate the project and solution. Also removed COM references to EnvDTE and Microsoft.VisualStudio.TextManager.Interop from the csproj, as they seem to both be unnecessary and would trigger build warnings because of changes to GAC. Patch by Hugo Puhlmann! Differential Revision: https://reviews.llvm.org/D31740 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300225 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format-vs: Use a separate license.txt copyHans Wennborg2017-04-133-7/+40
| | | | | | | The regular file used to display very poorly in the VSIX installer due to long lines, wrapping etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300223 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format-vsix: Add "Format on Save" featureAntonio Maiorano2017-04-054-90/+279
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299543 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format vs plugin support for Visual Studio 2017Hans Wennborg2017-03-311-0/+3
| | | | | | | | | | | | | | | | | | | | With the release of Visual Studio 2017, we need to at the very least claim support for it in the current manifest file. With the changes introducted in this patch we can install the extension again, but a warning message will be shown stating that it's not supported (https://twitter.com/parsley72/status/846558416751411200). To get the rid of the warning more work is necessary, as VS 2017 changed some things about extensions, see more here: https://docs.microsoft.com/en-us/visualstudio/extensibility/how-to-migrate-extensibility-projects-to-visual-studio-2017. While working on those changes, it has been suggested in the mail list that this first patch is integrated in the meantime. Patch by Hugo Puhlmann! Differential Revision: https://reviews.llvm.org/D31522 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299210 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format-vsix: add command to format documentAntonio Maiorano2016-12-165-19/+119
| | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289910 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format-vsix: add a date stamp to the VSIX version number to ensure ↵Antonio Maiorano2016-12-161-1/+4
| | | | | | | | | | upgradability Presently, the version number of the VSIX matches the LLVM version number. However, as this number doesn't change often, it means that as we release new versions of this VSIX, it will have the same version number, which means users must first uninstall the old version before installing the new one. With this change, we generate a 4th part to the version number that is a date stamp (year, month, day); for example: 4.0.0.161203. Differential Revision: https://reviews.llvm.org/D27438 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289909 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix VS2015 build of clang-format-vsix by using NuGet to pull in required ↵Hans Wennborg2016-12-015-24/+138
| | | | | | | | | | assemblies Also added a gitignore to help track the right items to commit. Patch by Antonio Maiorano <amaiorano@gmail.com>! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288393 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format VS plugin: upgrade the project files to VS2015Hans Wennborg2016-09-153-4/+6
| | | | | | | The plugin itself runs on previous VS versions, but this enables it to be built with VS2015. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281648 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260378 91177308-0d34-0410-b5e6-96231b3b80d8
* Update clang-format-vs READMEHans Wennborg2015-12-081-3/+4
| | | | | | VS2013 is requried after r231084. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255029 91177308-0d34-0410-b5e6-96231b3b80d8
* Added new options to ClangFormat VSIX package.Marek Kurdej2015-10-192-7/+142
| | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250694 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix clang-format build from the solution; the underlying path has changed to ↵Manuel Klimek2015-05-121-2/+2
| | | | | | include the VS directory structure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237136 91177308-0d34-0410-b5e6-96231b3b80d8
* Migrate clang-format-vs plugin project to VS 2013Hans Wennborg2015-03-032-6/+3
| | | | | | | | | | The plugin still works fine in versions starting from 2010, but this was needed to make the project _build_ in VS 2013, which is the blessed version for building LLVM projects these days. http://reviews.llvm.org/D8021 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231084 91177308-0d34-0410-b5e6-96231b3b80d8
* Update build instructions for the clang-format VS pluginHans Wennborg2014-08-011-4/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214529 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format vs plugin: claim support for VS 14 CTP tooHans Wennborg2014-08-011-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214461 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format vs plugin: include the licenseHans Wennborg2014-07-293-2/+12
| | | | | | | | | The vsix installer will show the license when it starts, and it would print an annoying message when there was none. While we're here, add a MoreInfoUrl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214237 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format vs plugin: set version number from cmake (PR20307)Hans Wennborg2014-07-212-4/+11
| | | | | | | | | | | | | | | Previously it was hard-coded to 1.0, which meant the installer would not install the plugin over previous versions. This commit makes us use LLVM's major.minor.patch version from cmake, or whatever CLANG_FORMAT_VS_VERSION is set to when configuring the build. It's pretty dirty to update a configuration file in the source directory from the cmake build like this. However, the plugin build is already dirty in this regard since it builds in the source dir when visual studio, and then copies out the resulting vsix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213584 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format vsix cmake build: use ${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}Hans Wennborg2013-12-051-2/+2
| | | | | | | | as the location for grabbing clang-format.exe, and also output the .vsix here. This allows us to find clang-format.exe when building from a MSVC Solution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196512 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: enable building the clang-format vs pluginHans Wennborg2013-12-032-0/+19
| | | | | | | | | | | This makes it possible to build the clang-format vs plugin from the cmake build. It is a hack, as it shells out to "devenv" to actually build it, but it's hidden away in a corner behind a flag, and it provides a convenient way of building the plug-in from the command-line together with the rest of clang. Differential Revision: http://llvm-reviews.chandlerc.com/D2310 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196299 91177308-0d34-0410-b5e6-96231b3b80d8
* ClangFormatPackage.cs: fix inconsistent line endingsHans Wennborg2013-12-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196131 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format vs plugin: use Alp's suggestion for getting the pathHans Wennborg2013-12-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196124 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format vs plugin: bake clang-format.exe into the vsixHans Wennborg2013-12-023-1/+11
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196122 91177308-0d34-0410-b5e6-96231b3b80d8
* Clang format VS plugin: update build prerequisites in the READMEHans Wennborg2013-11-251-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195690 91177308-0d34-0410-b5e6-96231b3b80d8
* Add txt file extension to VS solution's READMEAlp Toker2013-11-221-2/+2
| | | | | | | | | This matches other README.txt files in LLVM and makes things more obvious on Windows where it's likely to be read. CRLFs are retained for the same reason. Also fix Visual Studio product name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195420 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade the VS solution to 2012.Manuel Klimek2013-11-123-6/+54
| | | | | | Now we can compile a VSPackage that works with VS 2010-2013 from within VS 2012. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194488 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix key bindings for VS 2010.Manuel Klimek2013-11-121-4/+5
| | | | | | | Set the default key-binding only in the text editor; the global binding of ctrl-r,ctrl-f was already taken in VS 2010. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194482 91177308-0d34-0410-b5e6-96231b3b80d8
* Recreated the ClangFormat VSPackage with VS 2010.Manuel Klimek2013-11-127-45/+46
| | | | | | The generated package is now compatible with VS 2010 - 2013. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194480 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert unintentional commit from r194477.Manuel Klimek2013-11-125-53/+67
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194478 91177308-0d34-0410-b5e6-96231b3b80d8
* git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194477 ↵Manuel Klimek2013-11-125-67/+53
| | | | 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190413 91177308-0d34-0410-b5e6-96231b3b80d8
* 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190036 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds a VSPackage project that builds a VS extension to run clang-format over ↵Manuel Klimek2013-09-0415-0/+959
a selection / the line at the cursor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189955 91177308-0d34-0410-b5e6-96231b3b80d8