summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Tooling/CompilationDatabaseTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Roll-back r250822.Angel Garcia Gomez2015-10-201-1/+1
| | | | | | | | | | Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 llvm-svn: 250827
* Apply modernize-use-default to clang.Angel Garcia Gomez2015-10-201-1/+1
| | | | | | | | | | | | Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 llvm-svn: 250822
* [tooling] Provide the compile commands of the JSON database in the order ↵Argyrios Kyrtzidis2015-09-221-0/+19
| | | | | | | | | | | that they were provided in the JSON file. This is useful for debugging of issues and reduction of test cases. For example, an issue may show up due to the order that some commands were processed. It is convenient to be able to remove commands from the file and still preserve the order that they are returned, instead of getting a completely different order when removing a few commands. llvm-svn: 248292
* [tooling] Add unit tests for change in r247468.Argyrios Kyrtzidis2015-09-161-3/+7
| | | | llvm-svn: 247832
* Fix performance regression when running clang tools.Manuel Klimek2015-09-081-1/+3
| | | | | | | Brings tool start time for a large synthetic test case down from (on my machine) 4 seconds to 0.5 seconds. llvm-svn: 247018
* Add structed way to express command line options in the compilation database.Manuel Klimek2015-08-141-1/+24
| | | | | | | | | | | | | | | | | | | | Currently, arguments are passed via the string attribute 'command', assuming a shell-escaped / quoted command line to extract the original arguments. This works well enough on Unix systems, but turns out to be problematic for Windows tools to generate. This CL adds a new attribute 'arguments', an array of strings, which specifies the exact command line arguments. If 'arguments' is available in the compilation database, it is preferred to 'commands'. Currently there is no plan to retire 'commands': there are enough different use cases where users want to create their own mechanism for creating compilation databases, that it doesn't make sense to force them all to implement shell command line parsing. Patch by Daniel Dilts. llvm-svn: 245036
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 llvm-svn: 234678
* [C++11] Use 'nullptr'. Unittests edition.Craig Topper2014-06-081-3/+3
| | | | llvm-svn: 210423
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-9/+9
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Replace OwningPtr::isValid() with conversion to bool.Ahmed Charles2014-03-071-4/+4
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203277
* unittests: explicit stringify StringRefs for conversionSaleem Abdulrasool2014-01-251-1/+1
| | | | | | | | | When clang is built outside of the LLVM tree (against a corresponding version), there is no definition providing for operator<<(std::ostream &, StringRef) which is required for the assertion routines in google-test tests. Avoid the compilation failure by explicitly stringifying the StringRef prior to use. llvm-svn: 200096
* Relax some preconditions for using FixedCompilationDatabase.Edwin Vane2013-11-171-3/+41
| | | | | | | | FixedCompilationDatabase (FCD) requires that the arguments it consumes after '--' must not include positional parameters or the argv[0] of the tool. This patch relaxes those restrictions. llvm-svn: 194968
* 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
* Use only explicit bool conversion operatorDavid Blaikie2013-05-151-2/+2
| | | | | | | | | | | | | | | | | | | The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. DiagnosticBuilder kept its implicit conversion operator owing to the prevalent use of it in return statements. One bug was found in ExprConstant.cpp involving a comparison of two PointerUnions (PointerUnion did not previously have an operator==, so instead both operands were converted to bool & then compared). A test is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix (adding operator== to PointerUnion in LLVM). llvm-svn: 181869
* CommandLineArgumentParser: handle single quotes.Peter Collingbourne2013-03-021-0/+6
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D482 llvm-svn: 176404
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-7/+7
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Introduce CompilationDatabase::getAllCompileCommands() that returns allArgyrios Kyrtzidis2012-12-041-0/+49
| | | | | | compile commands of the database and expose it via the libclang API. llvm-svn: 169226
* CompilationDatabaseTest: Fix another Windows path issue.Daniel Jasper2012-10-081-2/+6
| | | | llvm-svn: 165425
* CompilationDatabase: Use //net paths for tests, as they should beDaniel Jasper2012-10-081-40/+42
| | | | | | considered absolute on all platforms. llvm-svn: 165422
* FileNameMatchTrie: Use StringRef instead of Twines where possible.Daniel Jasper2012-10-081-2/+2
| | | | llvm-svn: 165412
* Support symlinks and relative paths in complilation databases.Daniel Jasper2012-10-081-9/+86
| | | | | Review: http://llvm-reviews.chandlerc.com/D30 llvm-svn: 165392
* Use LLVM's plugin registry to enable registering new compilationDaniel Jasper2012-08-241-1/+1
| | | | | | | databases. Move JSONCompilationDatabase.h to its own files and register it as plugin. llvm-svn: 162541
* Allows retrieving all files in a CompilationDatabase.Manuel Klimek2012-07-131-0/+38
| | | | | | Patch by Tobias Koenig, some test changes by myself. llvm-svn: 160167
* Fixes crasher bug in JSONCompilationDatabase for invalid input.Manuel Klimek2012-05-151-0/+20
| | | | llvm-svn: 156814
* Adds a FixedCompilationDatabase to be able to specify tool parametersManuel Klimek2012-04-181-0/+69
| | | | | | at the command line. llvm-svn: 154989
* Adds a tooling library.Manuel Klimek2012-04-041-0/+223
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
OpenPOWER on IntegriCloud