summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Fix an object lifetime issue in clang/Tooling.Alexander Kornienko2012-05-311-6/+9
| | | | llvm-svn: 157759
* Adds a toString method to Replacement, which helps debugging.Manuel Klimek2012-05-301-0/+8
| | | | | | Adds missing header guards to Refactoring.h. llvm-svn: 157694
* Fixed a memory leak in clang/Tooling.Alexander Kornienko2012-05-301-2/+1
| | | | llvm-svn: 157687
* Tooling: Canonicalize Key in IndexByFile[]. llvm::sys::path::native() may be ↵NAKAMURA Takumi2012-05-232-4/+12
| | | | | | | | used here. It fixes test/Tooling on Win32 hosts. llvm-svn: 157350
* Adds the Refactoring library, which is a layer on top of the Tooling libraryManuel Klimek2012-05-232-1/+180
| | | | | | that allows easy refactoring across translation units. llvm-svn: 157331
* Fixes crasher bug in JSONCompilationDatabase for invalid input.Manuel Klimek2012-05-151-6/+22
| | | | llvm-svn: 156814
* Fix -Wdelete-non-virtual-dtor in Tooling code.David Blaikie2012-05-091-0/+3
| | | | | | Also, add an anchor as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 156495
* Declare abstract class ArgumentsAdjuster. This abstract interface describesSimon Atanasyan2012-05-093-3/+41
| | | | | | | | | | | | | a command line argument adjuster, which is responsible for command line arguments modification before the arguments are used to run a frontend action. Define class ClangSyntaxOnlyAdjuster implements ArgumentsAdjuster interface. This class converts input command line arguments to the "syntax check only" variant. Reviewed by Manuel Klimek. llvm-svn: 156478
* Fix includes for unices that don't have chdir declared transitively.Manuel Klimek2012-05-071-1/+3
| | | | llvm-svn: 156302
* Includes direct.h for windows compilation.Manuel Klimek2012-05-071-0/+5
| | | | llvm-svn: 156301
* Fixes resolution of relative paths when running clang tools.Manuel Klimek2012-05-071-14/+19
| | | | | | | | | The chdir is not the perfect fix, as it is thread hostile. The real fix will be to make -working-dir work correctly, which will take time to implement. Before that, the tooling library cannot be used concurrently. llvm-svn: 156299
* Fixes the header search logic for tools:Manuel Klimek2012-04-251-5/+16
| | | | | | | The driver needs to get the correct path to the executable to deduce the header search path. llvm-svn: 155542
* Adds a FixedCompilationDatabase to be able to specify tool parametersManuel Klimek2012-04-181-0/+27
| | | | | | at the command line. llvm-svn: 154989
* Switches the JSONCompilationDatabase to use the YAML parser.Manuel Klimek2012-04-171-36/+45
| | | | | | | | | | | | | | | | | This will allow us to delete the JSON parser from llvm. The biggest change is a general change of strategy - instead of storing StringRef's to the values for the command line and directory in the input buffer, we store ScalarNode*'s. The reason is that the YAML parser's getRawValue on ScalarNodes returns a string that includes the quotes in case of double quoted strings. For the same reason we're removing the JSON parsing part of the command line parsing - this means an extra copy for a command line when it is requested (and only when it is requested). llvm-svn: 154929
* Fixes a fix to finding the current directory:Manuel Klimek2012-04-091-1/+4
| | | | | | | | We currently want to look whether PWD is available - if PWD is available it will get us the non-resolved current path, while fs::current_path will resolve symlinks. The long term fix is to not rely on that behavior any more. llvm-svn: 154330
* Tooling.cpp: Reorder inclusions according to the conding standards.NAKAMURA Takumi2012-04-041-3/+3
| | | | llvm-svn: 154016
* Tooling.cpp: Don't refer to $ENV{PWD}. Use llvm::sys::fs instead.NAKAMURA Takumi2012-04-041-1/+3
| | | | | | $ENV{PWD} is not expected to be set on all hosts. llvm-svn: 154015
* Adds a tooling library.Manuel Klimek2012-04-044-0/+541
| | | | | | | | | | | | | | | Provides an API to run clang tools (FrontendActions) as standalone tools, or repeatedly in-memory in a process. This is useful for unit-testing, map-reduce style applications, source transformation daemons or command line tools. The ability to run over multiple translation units with different command line arguments enables building up refactoring tools that need to apply transformations across translation unit boundaries. See tools/clang-check/ClangCheck.cpp for an example. llvm-svn: 154008
* Reverts the Tooling changes as requested by Chris.Manuel Klimek2011-06-026-1310/+0
| | | | llvm-svn: 132462
* This patch implements an AST matching framework that allows to writeManuel Klimek2011-05-313-30/+595
| | | | | | | | | | | tools that match on the C++ ASTs. The main interface is in ASTMatchers.h, an example implementation of a tool that removes redundant .c_str() calls is in the example RemoveCStrCalls.cpp. Various contributions: Zhanyong Wan, Chandler Carruth, Marcin Kowalczyk, Wei Xu, James Dennett. llvm-svn: 132374
* Pulls the common part of the clang-check example into Tooling, to allow new ↵Manuel Klimek2011-05-161-0/+81
| | | | | | tools to be implemented without duplicating the boilerplate. llvm-svn: 131425
* Let clang-check actually use the Directory entry in the json file.Nico Weber2011-05-141-1/+1
| | | | llvm-svn: 131367
* Remove noisy semicolons.Benjamin Kramer2011-04-302-2/+2
| | | | llvm-svn: 130621
* Add lib/Tooling to the Makefile build.Nico Weber2011-04-301-0/+15
| | | | llvm-svn: 130581
* This is the next step in building the standalone tools infrastructure:Manuel Klimek2011-04-274-3/+429
| | | | | | | | | | | | | | | This patch simplifies writing of standalone Clang tools. As an example, we add clang-check, a tool that runs a syntax only frontend action over a .cc file. When you integrate this into your favorite editor, you get much faster feedback on your compilation errors, thus reducing your feedback cycle especially when writing new code. The tool depends on integration of an outstanding patch to CMake to work which allows you to always have a current compile command database in your cmake output directory when you set CMAKE_EXPORT_COMPILE_COMMANDS. llvm-svn: 130306
* Adds a function to run FrontendActions over in-memory code. This isManuel Klimek2011-04-212-0/+223
the first step towards a standalone Clang tool infrastructure. The plan is to make it easy to build command line tools that run over the AST of source files in a project outside of the build system. llvm-svn: 129924
OpenPOWER on IntegriCloud