Commit Graph

36 Commits

Author SHA1 Message Date
Craig Topper 45857d4b58 Make a bunch of static arrays const.
llvm-svn: 250641
2015-10-18 05:14:41 +00:00
Benjamin Kramer e71037123b Make helpers static. clang-tools edition.
Also purge dead code found by it. NFC.

llvm-svn: 232948
2015-03-23 12:49:15 +00:00
Adrian Prantl b97f5c1eb2 Revert "Adapt clang-tools-extra to clang module format changes."
This reverts commit 230424.

llvm-svn: 230456
2015-02-25 02:46:37 +00:00
Adrian Prantl e95edbf5a9 Adapt clang-tools-extra to clang module format changes.
- add clangCodeGen.a to the tools that need it
- tweak pp-trace command line handling to not conflict with clang's.

llvm-svn: 230424
2015-02-25 01:32:04 +00:00
Adrian Prantl 77553c72dc Revert "Add clangCodeGen.a to the tools that need it after the clang module"
llvm-svn: 230310
2015-02-24 05:14:37 +00:00
Adrian Prantl d0a19981c4 Fix typo s/bitcodewriter/bitwriter
llvm-svn: 230307
2015-02-24 04:49:13 +00:00
Adrian Prantl 54e9d64533 Add clangCodeGen.a to the tools that need it after the clang module
format change.

llvm-svn: 230306
2015-02-24 04:26:29 +00:00
Adrian Prantl a22fd38174 Revert "Adapt Makefile dependencies for the clang module format change in r230089."
llvm-svn: 230104
2015-02-21 00:29:43 +00:00
Adrian Prantl 6897e3e456 Adapt Makefile dependencies for the clang module format change in r230089.
llvm-svn: 230090
2015-02-20 23:35:07 +00:00
Chris Bieneman fc4fd529c8 NFC. Migrating clang-tools-extra to the cl::HideUnrelatedOptions API.
llvm-svn: 227388
2015-01-28 22:45:26 +00:00
Pete Cooper 1d2f63a4ef Updated tools to match r227345 which changed the getRegisteredOptions method
llvm-svn: 227372
2015-01-28 21:34:05 +00:00
NAKAMURA Takumi dc872ed908 [CMake] Add dependencies on clangToolingCore.
llvm-svn: 220890
2014-10-30 00:44:01 +00:00
Daniel Jasper c1de000e22 Fix Makefiles after r220867.
llvm-svn: 220868
2014-10-29 18:55:41 +00:00
David Blaikie 590e5ff473 clang-modernize: Transform::createActionFactory return ownership by unique_ptr instead of raw pointer.
Follow up to r213851 to simplify code and reduce the chance of future
leaks.

llvm-svn: 215214
2014-08-08 16:06:07 +00:00
Benjamin Kramer 6e9142474d Plug memory leaks.
Most of the changes are mechanic std::unique_ptr insertions. All leaks were
detected by LeakSanitizer.

llvm-svn: 213851
2014-07-24 10:23:33 +00:00
Alp Toker e208dfc2af Track clang r213171
The clang rewriter is now a core facility.

llvm-svn: 213172
2014-07-16 16:50:17 +00:00
Alp Toker 573583e2f2 Track IntrusiveRefCntPtr::get() changes from LLVM r212366
llvm-svn: 212367
2014-07-05 03:04:33 +00:00
Craig Topper f61be9c971 [C++11] Use 'nullptr'.
llvm-svn: 210447
2014-06-09 02:03:06 +00:00
Benjamin Kramer fb68e640d2 Try to fix the build. newFrontendActionFactory was changed to return a unique_ptr.
llvm-svn: 207407
2014-04-28 10:06:50 +00:00
Ahmed Charles 6a2dc5c381 [C++11] Replace OwningPtr with std::unique_ptr.
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
2014-03-09 09:24:40 +00:00
Benjamin Kramer ffe110b304 [C++11] Replace llvm::tie with std::tie.
llvm-svn: 202646
2014-03-02 13:48:32 +00:00
NAKAMURA Takumi 78f534d689 [CMake] clang-tools-extra: Update dependencies.
llvm-svn: 196860
2013-12-10 01:41:10 +00:00
Alp Toker 9a5134e6be Fix a variety of user-visible and comment typos
llvm-svn: 196038
2013-12-01 05:08:12 +00:00
Rui Ueyama dfa171034c Add missing dependency for clang-modernize.
Clang-modernize uses clang-apply-replacements internally but its CMakefile.txt
lacked the dependency.

llvm-svn: 192723
2013-10-15 18:01:06 +00:00
Edwin Vane f6a34b5665 clang-modernize: Clean up help output
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
2013-10-08 23:31:05 +00:00
Edwin Vane c0f00b79f7 clang-modernize: Apply replacements using clang-apply-replacements
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
2013-10-05 12:15:58 +00:00
Ariel J. Bernal e5ba87b6bb Clean up timing command line option.
Use getNumOccurrences instead of usina a default constant string.

llvm-svn: 191308
2013-09-24 15:41:30 +00:00
Ariel J. Bernal f50eb0c73c Added tests for testing migration of files in a compilation database.
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
2013-09-23 18:37:32 +00:00
Ariel J. Bernal defd1a93c9 Fix for removing not included files from a compilation database.
remove_if doesn't alter the container properties. Need to use erase to remove
the elements past the new end.

llvm-svn: 190803
2013-09-16 20:12:22 +00:00
Ariel J. Bernal 583d095fa4 Transform files in a compilation database if no sources are provided.
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
2013-09-12 20:10:59 +00:00
Edwin Vane 684daa90f2 clang-modernize: Update docs with -include/-exclude
-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
2013-09-06 19:26:25 +00:00
Edwin Vane 5f002639e4 clang-modernize: Remove -headers option
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
2013-09-06 14:23:56 +00:00
Manuel Klimek bfbc8c8412 Fix writing of reformatted files.
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
2013-09-05 13:55:39 +00:00
Chandler Carruth e160627d7b Fix up a few straggling bits of the build system. This should fix the
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
2013-09-04 18:03:44 +00:00
Chandler Carruth b0b51b36d5 This is apparantely the one makefile that actually has file names in it.
;] Update them. Sorry for the breakage.

llvm-svn: 189963
2013-09-04 17:47:21 +00:00
Chandler Carruth d9063c46f5 Rename cpp11-migrate to clang-modernize.
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
2013-09-04 17:35:07 +00:00