summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Tooling.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* ClangTool: strip -o from the command linePavel Labath2013-06-061-2/+3
| | | | | | | | | | | | | | 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
* 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
* 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
* 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-121-9/+9
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-2/+2
| | | | | | | | | | | | | 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
* 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-231-4/+5
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* 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
* 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
* Adds support for auto-detection of compilation databasesManuel Klimek2012-07-101-20/+7
| | | | | | | | | | 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
* 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
* 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-231-2/+6
| | | | | | | | used here. It fixes test/Tooling on Win32 hosts. llvm-svn: 157350
* Declare abstract class ArgumentsAdjuster. This abstract interface describesSimon Atanasyan2012-05-091-3/+9
| | | | | | | | | | | | | 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
* 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-041-0/+291
| | | | | | | | | | | | | | | 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-021-403/+0
| | | | llvm-svn: 132462
* This patch implements an AST matching framework that allows to writeManuel Klimek2011-05-311-30/+30
| | | | | | | | | | | 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
* Remove noisy semicolons.Benjamin Kramer2011-04-301-1/+1
| | | | llvm-svn: 130621
* This is the next step in building the standalone tools infrastructure:Manuel Klimek2011-04-271-3/+107
| | | | | | | | | | | | | | | 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-211-0/+218
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