summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify code with the in place path::native. No functionality change.Benjamin Kramer2013-09-111-3/+2
| | | | llvm-svn: 190515
* Adding a vector version of clang::tooling::shiftedCodePosition().Edwin Vane2013-08-271-0/+17
| | | | | | | | | During the transition of clang::tooling::Replacements from std::set to std::vector, functions such as clang::tooling::applyAllReplacements() have been duplicated to take a std::vector<Replacement>. Applying this same temporary duplication to clang::tooling::shiftedCodePosition(). llvm-svn: 189358
* Tweak Replacement comparisonsEdwin Vane2013-08-161-13/+14
| | | | | | | | * Introduce operator< to replace Replacement::Less * Make operator== and operator< on Replacements non-member functions * Change order of comparisons in operator< to do string comparisons last llvm-svn: 188550
* Adding a vector version of tooling::applyAllReplacementsEdwin Vane2013-08-131-0/+17
| | | | | | | | | | | One day soon, tooling::Replacements will be changed from being implemented as an std::set to being implemented as an std::vector. Until then, some new code using vectors of Replacements would enjoy having a version of applyAllReplacements that takes a vector. Differential Revision: http://llvm-reviews.chandlerc.com/D1380 llvm-svn: 188295
* Fixing a conflict detection bug in tooling::deduplicateEdwin Vane2013-08-131-2/+3
| | | | | | | | If a Replacment is contained within the conflict range being built, the conflict range would be erroneously shortened. Now fixed. Tests updated to catch this case. llvm-svn: 188287
* Fix warning in builds without asserts.Rafael Espindola2013-08-101-0/+1
| | | | llvm-svn: 188132
* Simplify now that llvm::sys::current_path checks $PWD.Rafael Espindola2013-08-101-12/+5
| | | | llvm-svn: 188128
* Introduce Replacement deduplication and conflict detection functionEdwin Vane2013-08-081-0/+44
| | | | | | | | | | Summary: This patch adds tooling::deduplicate() which removes duplicates from and looks for conflicts in a vector of Replacements. Differential Revision: http://llvm-reviews.chandlerc.com/D1314 llvm-svn: 187979
* Allow clang tools to display an overview when using the CommonOptionsParser.Manuel Klimek2013-07-191-2/+3
| | | | | | Patch by Guillaume Papin. llvm-svn: 186671
* Constify Replacements parameter to applyAllReplacements.David Blaikie2013-07-171-4/+4
| | | | | | | | http://llvm-reviews.chandlerc.com/D1169 Patch by Guillaume Papin. llvm-svn: 186526
* Update for llvm API change.Rafael Espindola2013-07-161-2/+2
| | | | llvm-svn: 186448
* Put helper class in anonymous namespace.Craig Topper2013-07-011-2/+2
| | | | llvm-svn: 185306
* Remove unused include.Rafael Espindola2013-06-261-1/+0
| | | | llvm-svn: 184936
* Use llvm::sys::fs::getMainExecutable.Rafael Espindola2013-06-261-1/+1
| | | | llvm-svn: 184915
* In tooling, reenable freeing of datastructures in codegen, just as we do forNick Lewycky2013-06-251-0/+1
| | | | | | the frontend. We don't want to respect the -disable-free flag here. llvm-svn: 184861
* Include PathV1.h only where it is used.Rafael Espindola2013-06-171-0/+1
| | | | llvm-svn: 184090
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-141-3/+4
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989
* Include Path.h instead of PathV2.h.Rafael Espindola2013-06-111-1/+1
| | | | | | I am about to move PathV2.h to Path.h. llvm-svn: 183795
* ClangTool: strip -o from the command linePavel Labath2013-06-062-2/+20
| | | | | | | | | | | | | | Summary: This patch creates a new ArgumentsAdjuster, which removes all -o parameters from the command line. This adjuster is inserted by default into the ClangTool pipeline. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D925 llvm-svn: 183398
* Make clang tools ignore -fcolor-diagnostics and -fdiagnostics-color ↵Alexander Kornienko2013-06-051-2/+10
| | | | | | | | | | | | | | | | | | | retrieved from the compilation database. Summary: Clang tools' diagnostic output could be force colored when a command line from the compilation database contains -fcolor-diagnostics or -fdiagnostics-color. This is not what we want e.g. for vim integration. Reviewers: klimek Reviewed By: klimek CC: cfe-commits, revane, jordan_rose Differential Revision: http://llvm-reviews.chandlerc.com/D917 llvm-svn: 183304
* Enables chaining of argument adjusters in clang tools.Manuel Klimek2013-06-041-4/+16
| | | | | | | | This enables changing clang-check to get extra arguments. Patch by Pavel Labath. llvm-svn: 183227
* Let clang-format move the cursor appropriately.Daniel Jasper2013-05-211-0/+13
| | | | | | | | | With this patch, clang-format will try to keep the cursor at the original code position in editor integrations (implemented for emacs and vim). This means, after formatting, clang-format will try to keep the cursor on the same character of the same token. llvm-svn: 182373
* Add a more convenient interface to use clang-format.Daniel Jasper2013-05-161-13/+44
| | | | | | | | | | | | It turns out that several implementations go through the trouble of setting up a SourceManager and Lexer and abstracting this into a function makes usage easier. Also abstracts SourceManager-independent ranges out of tooling::Refactoring and provides a convenience function to create them from line ranges. llvm-svn: 181997
* ClangTool output cleanupEdwin Vane2013-03-151-2/+8
| | | | | | | | | | Information messages sent to stdout by ClangTool now only happen when the -debug flag is set. Error messages that used to go to stdout now go to stderr. Author: Ariel J Bernal <ariel.j.bernal@intel.com> llvm-svn: 177177
* Reverting r176944 until Author fixes test failure.Edwin Vane2013-03-131-5/+2
| | | | llvm-svn: 176945
* ClangTool output cleanupEdwin Vane2013-03-131-2/+5
| | | | | | | | | | Information messages sent to stdout by ClangTool now only happen when the -debug flag is set. Error messages that used to go to stdout now go to stderr. Author: Ariel J Bernal <ariel.j.bernal@intel.com> llvm-svn: 176944
* CommandLineArgumentParser: handle single quotes.Peter Collingbourne2013-03-021-3/+14
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D482 llvm-svn: 176404
* Nuke SetUpBuildDumpLog.Sean Silva2013-01-201-6/+3
| | | | | | | Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. llvm-svn: 172945
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-125-40/+38
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Fix spurious output in JSONCompilationDatabaseArnaud A. de Grandmaison2013-01-121-5/+1
| | | | llvm-svn: 172321
* Allow RefactoringTool to write to memory instead of always to diskEdwin Vane2013-01-111-29/+34
| | | | | | | | | | | | | | | RefactoringTool::run() always writes the result of rewrites to disk. Instead, make this optional and provide a method for getting the refactoring results in a memory buffer instead. Also made ClangTool polymorphic so RefactoringTool could inherit from it to properly express the IS-A relationship. This change also provides access to ClangTool's public interface, e.g. mapVirtualFile() which is important once refactored buffers start living in memory instead of on disk. Reviewers: klimek llvm-svn: 172219
* Style and Doc fix for CommonOptionsParserEdwin Vane2012-12-141-2/+2
| | | | | | | | | | | | - Renaming GetCompilations() and GetSourcePathList() to follow LLVM style. - Updating docs to reflect name change. - Also updating help text to not mention clang-check since this class can be used by any tool. Reviewed By: Alexander Kornienko llvm-svn: 170229
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-044-5/+4
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Introduce CompilationDatabase::getAllCompileCommands() that returns allArgyrios Kyrtzidis2012-12-042-9/+30
| | | | | | compile commands of the database and expose it via the libclang API. llvm-svn: 169226
* Remove some dead code. CLANG_IS_PRODUCTION is now just a build flag andRafael Espindola2012-11-271-1/+1
| | | | | | is not used in any #ifdef. llvm-svn: 168703
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-232-9/+9
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Only report first error when no compilation database is found.Daniel Jasper2012-10-151-2/+7
| | | | | Review: http://llvm-reviews.chandlerc.com/D62 llvm-svn: 165933
* Hopefully appease Windows buildbot with Japanese (?) error message.Daniel Jasper2012-10-081-0/+1
| | | | llvm-svn: 165414
* FileNameMatchTrie: Use StringRef instead of Twines where possible.Daniel Jasper2012-10-081-3/+2
| | | | llvm-svn: 165412
* Support symlinks and relative paths in complilation databases.Daniel Jasper2012-10-083-3/+212
| | | | | Review: http://llvm-reviews.chandlerc.com/D30 llvm-svn: 165392
* Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek2012-09-012-2/+3
| | | | | | | This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. llvm-svn: 163050
* Tooling: Add a runToolOnCodeWithArgs() function that allowsNico Weber2012-08-301-8/+13
| | | | | | | | passing additional parameters to a tool. Use this to fix a FIXME in testing code. llvm-svn: 162889
* Only add common tool options when CommonOptionsParser is used.Alexander Kornienko2012-08-281-5/+5
| | | | | | | | | | | | | | Summary: Subj. Reviewers: chandlerc, klimek, djasper Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D29 llvm-svn: 162798
* Fix the definition of JSONAnchorSource. MSVC mangles variable symbols, and ↵NAKAMURA Takumi2012-08-241-1/+1
| | | | | | "volatile" affects. llvm-svn: 162550
* Use LLVM's plugin registry to enable registering new compilationDaniel Jasper2012-08-244-298/+320
| | | | | | | databases. Move JSONCompilationDatabase.h to its own files and register it as plugin. llvm-svn: 162541
* Updated LibTooling.html, minor improvements in CommonOptionsParserAlexander Kornienko2012-08-241-1/+1
| | | | llvm-svn: 162521
* Reverted clang-check to fully supported CommandLine Library use-case: globalAlexander Kornienko2012-08-222-32/+31
| | | | | | static variables. llvm-svn: 162391
* Fixes a segfault in Tooling when using pch's:Manuel Klimek2012-07-311-0/+1
| | | | | | | | Clear the FileManager's stat cache in between running translation units, as the stat cache loaded from a pch is only valid for one compiler invocation. llvm-svn: 161047
* clang/lib: [CMake] Update tblgen'd dependencies.NAKAMURA Takumi2012-07-271-0/+5
| | | | llvm-svn: 160851
* clang/lib: [CMake] Reformat, alphabetize lists.NAKAMURA Takumi2012-07-271-3/+3
| | | | llvm-svn: 160850
OpenPOWER on IntegriCloud