summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Reverted custom init hook from r160369.Alexander Kornienko2012-07-182-42/+0
| | | | llvm-svn: 160432
* Add a custom initialize hook for clang tools + minor fixes in ↵Alexander Kornienko2012-07-174-3/+50
| | | | | | CustomCompilationDatabase.h llvm-svn: 160369
* Finishing the move of RefactoringCallbacks and fixing the correspondingDaniel Jasper2012-07-171-11/+14
| | | | | | buildbot failures. llvm-svn: 160355
* Move RefactoringCallbacks to Tooling to avoid dependency fromDaniel Jasper2012-07-172-0/+80
| | | | | | | ASTMatchers (lower level abstraction) to Tooling (higher level abstraction). llvm-svn: 160351
* Fix copy-paste mistake for CMake dependency.Ted Kremenek2012-07-161-1/+1
| | | | llvm-svn: 160315
* Looks like libTooling might also depend on ClangDiagnosticCommon.Ted Kremenek2012-07-161-0/+4
| | | | llvm-svn: 160313
* The new clang-ast-dump tool for selective AST dumping. Moved common ↵Alexander Kornienko2012-07-162-0/+81
| | | | | | command-line tool stuff to CommandLineClangTool llvm-svn: 160265
* Allows retrieving all files in a CompilationDatabase.Manuel Klimek2012-07-131-0/+20
| | | | | | Patch by Tobias Koenig, some test changes by myself. llvm-svn: 160167
* Add a hook to supply a custom CompilationDatabase. To add a custom ↵Daniel Jasper2012-07-112-0/+46
| | | | | | | | CompilationDatabase, make it implement findCompilationDatabaseForDirectory in CustomCompilationDatabase.h and set USE_COSTUM_COMPILATION_DATABASE. Differential Revision: http://llvm-reviews.chandlerc.com/D4 llvm-svn: 160061
* Adds support for auto-detection of compilation databases, looking in a ↵Arnaud A. de Grandmaison2012-07-101-9/+33
| | | | | | directory and all its parents. llvm-svn: 159998
* Adds support for auto-detection of compilation databasesManuel Klimek2012-07-102-21/+25
| | | | | | | | | | from a source file and changes clang-check to make use of this. This makes clang-check just work on in-tree builds, and allows easy setup via a symlink per source directory to make clang-check work without any extra configuration. llvm-svn: 159990
* Adapts the FrontendAction convenience functions so that it can beManuel Klimek2012-07-051-1/+0
| | | | | | | | used with classes that generate ASTConsumers; this allows decoupling the ASTConsumer generation from the Frontend library (like, for example, the MatchFinder in the upcoming ASTMatcher patch). llvm-svn: 159760
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-1/+7
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* Fixed a problem related to resolution of built-in headers in case a path of ↵Alexander Kornienko2012-06-041-25/+15
| | | | | | tool's binary contains sym-links. llvm-svn: 157944
* ToolInvocation::mapVirtualFile(): Tweak for Win32. Handle the key as native ↵NAKAMURA Takumi2012-06-021-1/+3
| | | | | | path. llvm-svn: 157889
OpenPOWER on IntegriCloud