Commit Graph

30 Commits

Author SHA1 Message Date
Alexander Kornienko 87638f6345 Use 'override/final' instead of 'virtual' for overridden methods
Summary:
The patch is generated using clang-tidy misc-use-override check.

This command was used:

  tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
      -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix

  svn diff | clang-format-diff -i

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D8927

llvm-svn: 234681
2015-04-11 07:59:33 +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 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
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
NAKAMURA Takumi 729be14435 Prune CRLF.
llvm-svn: 220678
2014-10-27 12:37:26 +00:00
Benjamin Kramer 4e3f971f58 Plug a unit test memory leak.
MatchFinder.addMatcher doesn't take ownership.

llvm-svn: 217162
2014-09-04 15:15:27 +00:00
David Blaikie 680c4c898c Recommit 213308: unique_ptr-ify ownership of ASTConsumers (reverted in r213324)
After post-commit review and community discussion, this seems like a
reasonable direction to continue, making ownership semantics explicit in
the source using the type system.

llvm-svn: 215324
2014-08-10 19:56:59 +00:00
David Blaikie 5bae2c87d5 Revert "unique_ptr-ify ownership of ASTConsumers"
This reverts commit r213308.

Reverting to have some on-list discussion/confirmation about the ongoing
direction of smart pointer usage in the LLVM project.

llvm-svn: 213324
2014-07-17 22:33:56 +00:00
David Blaikie b9574aceae unique_ptr-ify ownership of ASTConsumers
llvm-svn: 213308
2014-07-17 20:40:47 +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
Rafael Espindola fd85bb3424 include system_error directly.
llvm-svn: 210797
2014-06-12 16:53:02 +00:00
Rafael Espindola 15c5784d3c Replace llvm::error_code with std::error_code.
llvm-svn: 210776
2014-06-12 13:32:11 +00:00
Craig Topper f61be9c971 [C++11] Use 'nullptr'.
llvm-svn: 210447
2014-06-09 02:03:06 +00:00
Rafael Espindola 228166a4ca Use error_code() instead of error_code::succes()
There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

llvm-svn: 209953
2014-05-31 02:00:59 +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
Craig Topper a3dbe84166 [C++11] Replace LLVM_OVERRIDE with 'override'
llvm-svn: 202632
2014-03-02 10:20:11 +00:00
Chandler Carruth 85e6e87171 Run llvm/utils/sort_includes.py over the Clang tools code. This doesn't
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
2014-01-07 20:05:01 +00:00
NAKAMURA Takumi 78f534d689 [CMake] clang-tools-extra: Update dependencies.
llvm-svn: 196860
2013-12-10 01:41:10 +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
Edwin Vane 59d93af4a5 clang-apply-replacements: Add code formatting functionality
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
2013-09-30 13:59:21 +00:00
Edwin Vane bdd8561dea clang-modernize: Fixing a few left over cpp11-migrate references
Build files for unit tests hadn't been updated yet.

llvm-svn: 191451
2013-09-26 19:26:58 +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 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
Chandler Carruth 8e8db654be Update the header guards for clang-modernize's unittests.
llvm-svn: 189974
2013-09-04 19:15:54 +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 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