Commit Graph

39 Commits

Author SHA1 Message Date
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 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
Nikola Smiljanic 76c21b5a27 Handle newlines on Windows correctly.
llvm-svn: 223750
2014-12-09 02:57:56 +00:00
NAKAMURA Takumi 5f687a036f [CMake] clangApplyReplacement: Add clangAST in libdeps to appease msc builder.
clangApplyReplacements.lib(ApplyReplacements.cpp.obj) : error LNK2001: unresolved external symbol "private: void __thiscall clang::APValue::DestroyDataAndMakeUninit(void)" (?DestroyDataAndMakeUninit@APValue@clang@@AAEXXZ)

They are not seen in mingw dll build. Investigating.

llvm-svn: 220895
2014-10-30 03:22:32 +00:00
NAKAMURA Takumi 9f99a7a417 [CMake] Prune redundant libdeps.
llvm-svn: 220893
2014-10-30 01:37:44 +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
Benjamin Kramer 91ea478d7c clang-apply-replacements: For-rangify.
No functionality change.

llvm-svn: 217442
2014-09-09 14:09:48 +00:00
Benjamin Kramer ab7cefc36b clang-apply-replacements: Deduplicate paths with FileManager.
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
2014-09-09 13:53:51 +00:00
David Blaikie 715c98aeec Update for Clang API change.
llvm-svn: 216615
2014-08-27 20:54:50 +00:00
Rafael Espindola 7fa030330c Update for LLVM api change.
llvm-svn: 216584
2014-08-27 20:03:22 +00:00
Rafael Espindola b14bd53e6d Update for LLVM api change
llvm-svn: 216396
2014-08-25 18:17:00 +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 43f0aa6caf Update for llvm api change.
llvm-svn: 212406
2014-07-06 17:43:19 +00:00
Alp Toker 573583e2f2 Track IntrusiveRefCntPtr::get() changes from LLVM r212366
llvm-svn: 212367
2014-07-05 03:04:33 +00:00
Rafael Espindola c7f0d23f56 Prefix error_code with std.
llvm-svn: 210840
2014-06-12 22:08:48 +00:00
Rafael Espindola 002840cf66 Quick build fix.
llvm-svn: 210838
2014-06-12 22:01:48 +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
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
NAKAMURA Takumi 9698686505 [CMake] Use LINK_LIBS instead of target_link_libraries().
llvm-svn: 202238
2014-02-26 06:41:29 +00:00
Rafael Espindola 26af26255c Update for llvm api change.
llvm-svn: 202055
2014-02-24 18:21:04 +00:00
Rafael Espindola dc59a36caa Update for llvm api change.
llvm-svn: 202045
2014-02-24 15:41:44 +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
NAKAMURA Takumi ff9225f3d7 [CMake] clang-tools-extra may not depend on LLVM CodeGen.
llvm-svn: 196805
2013-12-09 19:27:57 +00:00
Alexander Kornienko 3daaf32e93 Adapt the code to the interface change in r196108.
llvm-svn: 196109
2013-12-02 15:22:30 +00:00
Alexander Kornienko e5df476c8b Fix the build after r195016.
llvm-svn: 195020
2013-11-18 18:03:29 +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 2fb10d1889 clang-apply-replacements: Fixing doxygen warning
llvm-svn: 191754
2013-10-01 13:21:39 +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 6d5350cb76 clang-apply-replacements: Clean up -help and -version
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
2013-09-24 18:14:54 +00:00
Edwin Vane b225be2729 Rename clang-replace -> clang-apply-replacements
Made changes throughout clang-tools-extra for the renaming of
clang-replace to clang-apply-replacements as per feedback from
community.

llvm-svn: 189832
2013-09-03 17:58:19 +00:00