summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-apply-replacements/tool
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tools-extra] [cmake] Link against libclang-cpp whenever possibleMichal Gorny2019-10-041-2/+5
| | | | | | | | | Use clang_target_link_libraries() in order to support linking against libclang-cpp instead of static libraries. Differential Revision: https://reviews.llvm.org/D68448 llvm-svn: 373786
* [clang-tools-extra] [cmake] Use add_clang_tool() to install toolsMichal Gorny2019-10-041-3/+0
| | | | | | | | | | | | Replace add_clang_executable() calls with add_clang_tool() that takes care of creating correct, distribution-friendly install target. While at it, remove redundant install calls. This change also causes clang-move and pp-trace to be installed. Differential Revision: https://reviews.llvm.org/D68423 llvm-svn: 373694
* Remove \brief commands from doxygen comments.Dmitri Gribenko2019-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done [This is analogous to LLVM r331272 and CFE r331834] Subscribers: srhines, nemanjai, javed.absar, kbarton, MaskRay, jkorous, arphaman, jfb, kadircet, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66578 llvm-svn: 369643
* Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFCFangrui Song2019-08-051-1/+1
| | | | | | F_{None,Text,Append} are kept for compatibility since r334221. llvm-svn: 367800
* Rename clangToolingRefactor to clangToolingRefactoring for consistency with ↵Nico Weber2019-05-251-1/+1
| | | | | | | | | | its directory See "[cfe-dev] The name of clang/lib/Tooling/Refactoring". Differential Revision: https://reviews.llvm.org/D62420 llvm-svn: 361684
* 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
* Replace hardcoded format styles in a few tools with the default style in ↵Eric Liu2018-08-021-2/+2
| | | | | | libFormat. llvm-svn: 338696
* [clang-apply-replacements] Make clang-apply-replacements installableZinovy Nis2018-04-211-1/+1
| | | | | | | | | | | | Add a new target for install: install-clang-apply-replacements. So if you need clang-tidy and clang-apply-replacements tools only, you may build and install only these tools: make install-clang-tidy install-clang-apply-replacements Differential Revision: https://reviews.llvm.org/D45160 llvm-svn: 330509
* [clang-apply-replacements] Always initialize FormatStyle.Benjamin Kramer2018-04-121-9/+6
| | | | | | | | | The cleanup logic reads from this for cleanups even if reformatting is not requested. Found by msan. llvm-svn: 329894
* [clang-apply-replacements] Convert tooling::Replacements to ↵Malcolm Parsons2018-04-112-138/+17
| | | | | | | | | | | | | | | | | | | | tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting. Summary: By converting Replacements by AtomicChange, clang-apply-replacements is able like clang-tidy to automatically cleanup and format changes. This should permits to close this ticket: https://bugs.llvm.org/show_bug.cgi?id=35051 and attempt to follow hints from https://reviews.llvm.org/D43500 comments. Reviewers: klimek, ioeric Reviewed By: ioeric Subscribers: malcolm.parsons, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D43764 Patch by Jeremy Demeule. llvm-svn: 329813
* [CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai2017-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 llvm-svn: 319840
* Adjust SetVersionPrinter call for D33899Dimitry Andric2017-06-061-3/+3
| | | | | | | | | | | | | | | Summary: In D33899, I'm adding a `raw_ostream &` parameter to the function objects passed to `cl::SetVersionPrinter`. Adjust the call in clang-apply-replacements for this. Reviewers: klimek, alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33959 llvm-svn: 304837
* Update tools to use new getStyle APIAntonio Maiorano2017-01-171-2/+9
| | | | | | | | Depends on https://reviews.llvm.org/D28081 Differential Revision: https://reviews.llvm.org/D28315 llvm-svn: 292175
* [clang-tidy] Add check name to YAML export (clang-tools-extra part)Alexander Kornienko2017-01-031-6/+13
| | | | | | | | | | | | Add a field indicating the associated check for every replacement to the YAML report generated with the '-export-fixes' option. Update clang-apply-replacements to handle the new format. Patch by Alpha Abdoulaye! Differential revision: https://reviews.llvm.org/D26137 llvm-svn: 290893
* [clang-tools-extra] Format sources with clang-format. NFC.Mandeep Singh Grang2016-11-081-9/+6
| | | | | | | | | | | | | | | | Summary: Ran clang-format on all .c/.cpp/.h files in clang-tools-extra. Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories. Reviewers: klimek, alexfh Subscribers: nemanjai Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D26329 llvm-svn: 286221
* Fix clang-tools-extra build after r283815 (Store FileEntry::Filename as a ↵Mehdi Amini2016-10-101-1/+1
| | | | | | StringRef instead of raw pointer) llvm-svn: 283819
* Changes related to new implementation of tooling::Replacements as class.Eric Liu2016-08-011-1/+1
| | | | | | | | | | | | Summary: See http://reviews.llvm.org/D21748 for details. Reviewers: djasper, klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D21749 llvm-svn: 277336
* Remove autoconf supportChris Bieneman2016-01-261-29/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "Now I am become Death, the destroyer of worlds." -J. Robert Oppenheimer Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D16475 llvm-svn: 258864
* Replace double negation of !FileID.isInvalid() with FileID.isValid().Yaron Keren2015-10-031-1/+1
| | | | | | +couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228. llvm-svn: 249235
* clang-tools-extra: Appease PR24881. [-Wdocumentation]NAKAMURA Takumi2015-09-191-3/+6
| | | | | | \returns doesn't accept \li, but \parblock \li. llvm-svn: 248080
* Make helpers static. clang-tools edition.Benjamin Kramer2015-03-231-9/+11
| | | | | | Also purge dead code found by it. NFC. llvm-svn: 232948
* Revert "Adapt clang-tools-extra to clang module format changes."Adrian Prantl2015-02-251-3/+2
| | | | | | This reverts commit 230424. llvm-svn: 230456
* Adapt clang-tools-extra to clang module format changes.Adrian Prantl2015-02-251-2/+3
| | | | | | | - add clangCodeGen.a to the tools that need it - tweak pp-trace command line handling to not conflict with clang's. llvm-svn: 230424
* Revert "Adapt Makefile dependencies for the clang module format change in ↵Adrian Prantl2015-02-211-9/+2
| | | | | | r230089." llvm-svn: 230104
* Adapt Makefile dependencies for the clang module format change in r230089.Adrian Prantl2015-02-201-2/+9
| | | | llvm-svn: 230090
* NFC. Migrating clang-tools-extra to the cl::HideUnrelatedOptions API.Chris Bieneman2015-01-281-14/+6
| | | | llvm-svn: 227388
* Updated tools to match r227345 which changed the getRegisteredOptions methodPete Cooper2015-01-281-2/+1
| | | | llvm-svn: 227372
* Handle newlines on Windows correctly.Nikola Smiljanic2014-12-091-1/+1
| | | | llvm-svn: 223750
* [CMake] Prune redundant libdeps.NAKAMURA Takumi2014-10-301-1/+0
| | | | llvm-svn: 220893
* [CMake] Add dependencies on clangToolingCore.NAKAMURA Takumi2014-10-301-0/+1
| | | | llvm-svn: 220890
* Fix Makefiles after r220867.Daniel Jasper2014-10-291-1/+2
| | | | llvm-svn: 220868
* clang-apply-replacements: For-rangify.Benjamin Kramer2014-09-091-5/+4
| | | | | | No functionality change. llvm-svn: 217442
* clang-apply-replacements: Deduplicate paths with FileManager.Benjamin Kramer2014-09-091-14/+13
| | | | | | | | Bucket replacements by FileEntry instead of path. The same file with different paths is very common, relative #include paths and symlinks can easily create them. When that occurs we would apply the fix twice. llvm-svn: 217440
* Update for Clang API change.David Blaikie2014-08-271-3/+2
| | | | llvm-svn: 216615
* Update for LLVM api change.Rafael Espindola2014-08-271-2/+3
| | | | llvm-svn: 216584
* Update for LLVM api changeRafael Espindola2014-08-251-4/+3
| | | | llvm-svn: 216396
* Track clang r213171Alp Toker2014-07-162-2/+2
| | | | | | The clang rewriter is now a core facility. llvm-svn: 213172
* Track IntrusiveRefCntPtr::get() changes from LLVM r212366Alp Toker2014-07-051-1/+1
| | | | llvm-svn: 212367
* Prefix error_code with std.Rafael Espindola2014-06-121-2/+1
| | | | llvm-svn: 210840
* Quick build fix.Rafael Espindola2014-06-121-0/+1
| | | | llvm-svn: 210838
* [C++11] Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-091-1/+1
| | | | | | | | 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
* Update for llvm api change.Rafael Espindola2014-02-241-1/+1
| | | | llvm-svn: 202055
* Update for llvm api change.Rafael Espindola2014-02-241-1/+2
| | | | llvm-svn: 202045
* [CMake] clang-tools-extra: Update dependencies.NAKAMURA Takumi2013-12-101-0/+4
| | | | llvm-svn: 196860
* [CMake] clang-tools-extra may not depend on LLVM CodeGen.NAKAMURA Takumi2013-12-091-5/+1
| | | | llvm-svn: 196805
* Adapt the code to the interface change in r196108.Alexander Kornienko2013-12-021-1/+1
| | | | llvm-svn: 196109
* clang-modernize: Apply replacements using clang-apply-replacementsEdwin Vane2013-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | 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-apply-replacements: Fixing doxygen warningEdwin Vane2013-10-011-0/+1
| | | | llvm-svn: 191754
* clang-apply-replacements: Add code formatting functionalityEdwin Vane2013-09-301-8/+173
| | | | | | | | | | | | | | The tool now supports a collection of arguments to turn on and provide settings for the formatting of code affected by applying replacements: * --format turns on formatting (default style is LLVM) * --style controls code style settings * --style-config allows one to explicitly indicate where a style config file lives. The libclangApplyReplacements interface has a new function to turn Replacements into Ranges to be used with tooling::reformat(). llvm-svn: 191667
* clang-apply-replacements: Clean up -help and -versionEdwin Vane2013-09-241-0/+23
| | | | | | | | | | Options that leak from other parts of LLVM are now pruned out of -help. -version output is specific to clang-apply-replacements now. Differential Revision: http://llvm-reviews.chandlerc.com/D1747 llvm-svn: 191322
OpenPOWER on IntegriCloud