summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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
OpenPOWER on IntegriCloud