summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-modernize
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-121-4/+4
| | | | llvm-svn: 210776
* [C++11] Use 'nullptr'.Craig Topper2014-06-0912-39/+40
| | | | llvm-svn: 210447
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-311-3/+3
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209953
* Try to fix the build. newFrontendActionFactory was changed to return a ↵Benjamin Kramer2014-04-281-1/+1
| | | | | | unique_ptr. llvm-svn: 207407
* clang-modernize: fix invalid assignment in findClangApplyReplacements()Guillaume Papin2014-03-301-2/+2
| | | | | | | | | | | | | | | | | Summary: When clang-apply-replacements wasn't in the PATH or sitting next to clang-modernize, findClangApplyReplacements() was finding the wrong path (pointing to clang-modernize instead of nothing). See the related PR at http://llvm.org/bugs/show_bug.cgi?id=18421 Reviewers: klimek CC: silvas, cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3217 llvm-svn: 205136
* [C++11] Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-097-9/+7
| | | | | | | | This removes all references to OwningPtr, which should be fairly undisruptive to out-of-tree projects since they are unlikely to use clang-tools-extra as a library instead of a set of tools. llvm-svn: 203382
* [C++11] Add #include's for OwningPtr.Ahmed Charles2014-03-031-0/+1
| | | | | | Allows removing #include's in LLVM while switching to std::unique_ptr. llvm-svn: 202676
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-023-4/+4
| | | | llvm-svn: 202646
* [C++11] Replace LLVM_OVERRIDE with 'override'Craig Topper2014-03-0218-38/+38
| | | | llvm-svn: 202632
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-261-2/+2
| | | | llvm-svn: 202238
* Update for llvm api change.Rafael Espindola2014-02-242-2/+2
| | | | llvm-svn: 202055
* Update for llvm api change.Rafael Espindola2014-02-241-1/+2
| | | | llvm-svn: 202045
* Track clang changes from r200082Alp Toker2014-01-251-1/+1
| | | | llvm-svn: 200084
* Run llvm/utils/sort_includes.py over the Clang tools code. This doesn'tChandler Carruth2014-01-0712-17/+10
| | | | | | | | | | always produce as pretty of results as it does in LLVM and Clang, but I don't mind and the value of having a single canonical ordering is very high IMO. Let me know if you spot really serious problems here. llvm-svn: 198703
* [CMake] clang-tools-extra: Update dependencies.NAKAMURA Takumi2013-12-102-4/+12
| | | | llvm-svn: 196860
* clang-modernize: Update PPCallback user.Benjamin Kramer2013-12-071-11/+20
| | | | | | Add LLVM_OVERRIDE to make this a hard error in the future. llvm-svn: 196659
* Fix a variety of user-visible and comment typosAlp Toker2013-12-017-14/+14
| | | | llvm-svn: 196038
* Refactoring transform-specific optionsEdwin Vane2013-10-173-13/+19
| | | | | | | Making the user null macros command-line option visible to the UseNullptrTransform class instead of being visible only to the match callback. llvm-svn: 192905
* Add missing dependency for clang-modernize.Rui Ueyama2013-10-151-1/+1
| | | | | | | Clang-modernize uses clang-apply-replacements internally but its CMakefile.txt lacked the dependency. llvm-svn: 192723
* clang-modernize: Clean up help outputEdwin Vane2013-10-083-37/+92
| | | | | | | | | | Now hiding options clang-modernize doesn't use and didn't create. Version printer specialized for clang-modernize. EXAMPLES text fixed and brought up-to-date. Differential Revision: http://llvm-reviews.chandlerc.com/D1849 llvm-svn: 192253
* clang-modernize: Fixing doxygen warningsEdwin Vane2013-10-071-1/+3
| | | | llvm-svn: 192100
* clang-modernize: Fix clang-apply-replacements invocation bugEdwin Vane2013-10-051-0/+2
| | | | | | | The command-line for clang-apply-replacements was being mangled due to an uninitialized variable. gasp! Now fixed. llvm-svn: 192033
* clang-modernize: Apply replacements using clang-apply-replacementsEdwin Vane2013-10-0527-824/+397
| | | | | | | | | | | | | | | | | | | | | Summary: The clang-apply-replacements process is now invoked to apply replacements between applying transforms. This resulted in a massive simplification of the tool: - FileOverrides class no longer needed. - Change tracking and code formatting no longer needed. - No more dependency on libclangApplyReplacements. - Final syntax check is easier to do directly now than with a separate header/source pair. Replacement handling stuff abstracted into a new header/source pair to de-clutter ClangModernize.cpp somewhat. Tests updated. Differential Revision: http://llvm-reviews.chandlerc.com/D1836 llvm-svn: 192032
* clang-modernize: Reset LoopConvert's TU tracking info per TUEdwin Vane2013-09-264-50/+74
| | | | | | | | | | | | The LoopConvert transform makes use of data structures it builds up over the course of transforming a TU. Until now, these data structures weren't being cleared out before the next TU was being processed. Fixes PR17253. Differential Revision: http://llvm-reviews.chandlerc.com/D175 llvm-svn: 191448
* Clean up timing command line option.Ariel J. Bernal2013-09-241-5/+3
| | | | | | Use getNumOccurrences instead of usina a default constant string. llvm-svn: 191308
* Added tests for testing migration of files in a compilation database.Ariel J. Bernal2013-09-231-2/+15
| | | | | | | | This patch also fixes the case where a compilation database is autodetected from source but the file itself cannot be found in the compilation database, it then ignores the compilation database and transforms the file with c++11 support. llvm-svn: 191213
* Fix for removing not included files from a compilation database.Ariel J. Bernal2013-09-161-1/+3
| | | | | | | remove_if doesn't alter the container properties. Need to use erase to remove the elements past the new end. llvm-svn: 190803
* Transform files in a compilation database if no sources are provided.Ariel J. Bernal2013-09-125-34/+97
| | | | | | | Compile all files in a compilation database or a subset determined by a sub-directory so you don't have to specify them manually. llvm-svn: 190630
* clang-modernize: Fix bugs in Pass-By-Value transformGuillaume Papin2013-09-062-6/+24
| | | | | | | | | - Limit the transform to const-ref and non-const value parameters only. - Do not generate a replacement when the type is already a value. See CM-139 for the bugs corresponding to this issue. llvm-svn: 190212
* clang-modernize: Update docs with -include/-excludeEdwin Vane2013-09-061-6/+4
| | | | | | | | | -include/-exclude and friends have been marked as hidden options until this point. This is no longer necessary. Update the docs to describe their effect. Differential Revision: http://llvm-reviews.chandlerc.com/D1621 llvm-svn: 190194
* clang-modernize: Remove -headers optionEdwin Vane2013-09-063-26/+6
| | | | | | | | | | | | clang-modernize can now transform headers properly and the experimental -headers option is no longer necessary. Remember, at least -include is necessary for indicating which headers are allowed to be changed. Differential Revision: http://llvm-reviews.chandlerc.com/D1610 llvm-svn: 190158
* Fix writing of reformatted files.Manuel Klimek2013-09-051-10/+9
| | | | | | | | | If transformations lead to changes that do not need reformatting, the current strategy will not write those files. With this patch, we just update the overall state with the changes due to reformatting, and then write out everything. llvm-svn: 190050
* Update the header guards for clang-modernize.Chandler Carruth2013-09-0430-90/+90
| | | | llvm-svn: 189973
* Fix up a few straggling bits of the build system. This should fix theChandler Carruth2013-09-042-2/+2
| | | | | | | build of the clang-modernize unittest which is for some reason not being built by default on my system (sorry about that). llvm-svn: 189966
* This is apparantely the one makefile that actually has file names in it.Chandler Carruth2013-09-041-1/+1
| | | | | | ;] Update them. Sorry for the breakage. llvm-svn: 189963
* Rename cpp11-migrate to clang-modernize.Chandler Carruth2013-09-0465-0/+7878
There is no reason to expect this tool to be limited to C++11, it seems very likely to be of on-going interest. It seems likely to be useful for modernizing even as new libraries come out in TSes and other formats than a complete standard. Fundamentally, we need something a bit more general. After some discussion on the list, going with 'clang-modernize'. I've tried to do a reasonably comprehensive job of fixing up the names, but I may still have missed some. Feel free to poke me if you spot any fallout here. Things I've tried reasonably hard to find and fix: - cpp11-migrate -> clang-modernize - Migrator -> Modernizer - Clean up the introductory documentation that was C++11 specific. I'll also point out that this tool continues to delight me. =] Also, a huge thanks to those who have so carefully, thoroughly documented the tool. The docs here are simply phenomenal. Every tool should be this well documented. I hope I have updated the documentation reasonably well, but I'm not very good at documentation, so review much appreciated. llvm-svn: 189960
OpenPOWER on IntegriCloud