summaryrefslogtreecommitdiffstats
path: root/unittests/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Adds a tooling library.Manuel Klimek2012-04-041-0/+6
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154008 91177308-0d34-0410-b5e6-96231b3b80d8
* Add unit testing for Lexer.Argyrios Kyrtzidis2012-01-191-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148478 91177308-0d34-0410-b5e6-96231b3b80d8
* For SourceManager::isBeforeInTranslationUnit(), have it consider macro arg ↵Argyrios Kyrtzidis2011-12-211-1/+2
| | | | | | | | | | expanded token locations as coming before the closing ')' of a function macro expansion. Include a unit test for SourceManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147056 91177308-0d34-0410-b5e6-96231b3b80d8
* C++11 constexpr: Add note stacks containing backtraces if constant evaluationRichard Smith2011-12-161-5/+0
| | | | | | | | | | | fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit argument to driver and frontend, to control the maximum number of notes so produced (default 10). Fix APValue printing to be able to pretty-print all APValue types, and move the testing for this functionality from a unittest to a -verify test now that it's visible in clang's output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146749 91177308-0d34-0410-b5e6-96231b3b80d8
* Define DiagnosticBuilder<<APValue so it's easy to include APValues inJeffrey Yasskin2011-07-181-0/+5
| | | | | | diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135398 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverts the Tooling changes as requested by Chris.Manuel Klimek2011-06-021-15/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132462 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch implements an AST matching framework that allows to writeManuel Klimek2011-05-311-0/+5
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132374 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle gcc-compatible compilers (such as clang) the same way we handleOscar Fuentes2011-05-111-1/+1
| | | | | | | | gcc. Fixes PR9886. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131182 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the next step in building the standalone tools infrastructure:Manuel Klimek2011-04-271-0/+5
| | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130306 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds a function to run FrontendActions over in-memory code. This isManuel Klimek2011-04-211-0/+5
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129924 91177308-0d34-0410-b5e6-96231b3b80d8
* Put targets on folders, if the IDE supports the feature.Oscar Fuentes2011-02-201-0/+2
| | | | | | Requires CMake 2.8.3 or newer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126094 91177308-0d34-0410-b5e6-96231b3b80d8
* Use PARSE_ARGUMENTS to clean up add_clang_unittest's calling convention.Jeffrey Yasskin2011-02-191-10/+20
| | | | | | | | | It would be nice to propagate this into the other functions to replace LLVM_LINK_COMPONENTS and friends, but I don't plan to do that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126032 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support and mc from the clang unittests' dependencies because they're notJeffrey Yasskin2011-02-191-2/+2
| | | | | | | | | | | needed or provided by the libraries under test. The next step is to import http://www.itk.org/Wiki/CMakeMacroParseArguments to make the empty string parameter unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126024 91177308-0d34-0410-b5e6-96231b3b80d8
* Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenActionPeter Collingbourne2011-02-181-2/+2
| | | | | | | | | This removes the final dependency edge from any lib outside of CodeGen to core. As a result we can, and do, trim the dependency on core from libclang, PrintFunctionNames, the unit tests and c-index-test. While at it, review and trim other unneeded dependencies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125820 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds a CMake target for the Basic lib's unit tests. Reviewed byZhanyong Wan2011-02-161-0/+6
| | | | | | | jyasskin and chapuni. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125657 91177308-0d34-0410-b5e6-96231b3b80d8
* Improves CMakeLists.txt for Clang's unit tests: make "linkedZhanyong Wan2011-02-161-11/+7
| | | | | | | | components" and "used libs" arguments of add_clang_unittest(). Reviewed by jyasskin and chapuni. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125652 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CMake support to the clang unittests.Jeffrey Yasskin2011-02-151-0/+47
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125561 91177308-0d34-0410-b5e6-96231b3b80d8