Commit Graph

30 Commits

Author SHA1 Message Date
Douglas Gregor 8fd12c58b1 Attempt to fix unit tests
llvm-svn: 140748
2011-09-29 00:53:49 +00:00
David Blaikie b5784324b3 Rename DiagnosticInfo to Diagnostic as per issue 5397
llvm-svn: 140493
2011-09-26 01:18:08 +00:00
David Blaikie e2eefaecc8 Rename DiagnosticClient to DiagnosticConsumer as per issue 5397
llvm-svn: 140479
2011-09-25 23:39:51 +00:00
David Blaikie 9c902b5502 Rename Diagnostic to DiagnosticsEngine as per issue 5397
llvm-svn: 140478
2011-09-25 23:23:43 +00:00
NAKAMURA Takumi 7d7d1afeb7 unittests/Basic/FileManagerTest.cpp: Suppress warnings on gcc.
llvm-svn: 140364
2011-09-23 01:53:05 +00:00
Jeffrey Yasskin d2af962eee Define DiagnosticBuilder<<APValue so it's easy to include APValues in
diagnostics.

llvm-svn: 135398
2011-07-18 16:43:53 +00:00
NAKAMURA Takumi 67677898d3 unittests/Basic/FileManagerTest.cpp: Unbreak Win32, mingw and msvc.
LLVM_ON_WIN32 is defined in llvm/Config/config.h.
IMO, it might be enough with _WIN32 in most cases, LLVM_ON_xxx could be deprecated.

llvm-svn: 133794
2011-06-24 14:10:29 +00:00
John McCall 1d78d75a58 This random unit test also depends on ARCMigrate.
llvm-svn: 133148
2011-06-16 05:35:43 +00:00
John McCall d70fb9812a The ARC Migration Tool. All the credit goes to Argyrios and Fariborz
for this.

llvm-svn: 133104
2011-06-15 23:25:17 +00:00
Manuel Klimek 8a160cc42b Reverts the Tooling changes as requested by Chris.
llvm-svn: 132462
2011-06-02 16:58:33 +00:00
Manuel Klimek bc68d09abb Fix broken test on windows. To get operator new working, we need size_t, for which we need to figure out a way to resolve standard include paths in the test.
llvm-svn: 132386
2011-06-01 03:59:13 +00:00
Manuel Klimek 0cfc6a045c This patch implements an AST matching framework that allows to write
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
2011-05-31 23:49:32 +00:00
Oscar Fuentes cfc9efa43e Handle gcc-compatible compilers (such as clang) the same way we handle
gcc.

Fixes PR9886.

llvm-svn: 131182
2011-05-11 13:53:30 +00:00
Manuel Klimek c638cd21fb Adds a test for the command line parser when a quoted string is not closed by a quote.
llvm-svn: 130704
2011-05-02 18:27:26 +00:00
Manuel Klimek 6825eebcd6 This is the next step in building the standalone tools infrastructure:
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
2011-04-27 16:39:14 +00:00
Manuel Klimek d861e8b7be Adds a function to run FrontendActions over in-memory code. This is
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
2011-04-21 18:37:41 +00:00
Oscar Fuentes 15fe190027 Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

llvm-svn: 126094
2011-02-20 22:06:44 +00:00
Peter Collingbourne 8f5cf74c77 Re-instate r125819 and r125820 with no functionality change
llvm-svn: 126060
2011-02-19 23:03:58 +00:00
Rafael Espindola a6d2bff0c5 Revert 125820 and 125819 to fix PR9266.
llvm-svn: 126050
2011-02-19 21:39:31 +00:00
Jeffrey Yasskin 39a5820059 Use PARSE_ARGUMENTS to clean up add_clang_unittest's calling convention.
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.

llvm-svn: 126032
2011-02-19 18:06:01 +00:00
Jeffrey Yasskin ecdd68d760 Remove support and mc from the clang unittests' dependencies because they're not
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.

llvm-svn: 126024
2011-02-19 06:07:17 +00:00
Peter Collingbourne 14a552b2d7 Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenAction
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.

llvm-svn: 125820
2011-02-18 02:25:12 +00:00
Zhanyong Wan 5201b66530 Adds a CMake target for the Basic lib's unit tests. Reviewed by
jyasskin and chapuni.

llvm-svn: 125657
2011-02-16 05:45:20 +00:00
Zhanyong Wan f8a620f8e1 Improves CMakeLists.txt for Clang's unit tests: make "linked
components" and "used libs" arguments of add_clang_unittest().
Reviewed by jyasskin and chapuni.

llvm-svn: 125652
2011-02-16 05:19:17 +00:00
Zhanyong Wan bc402abcc9 Moves FileManagerTest.cpp to unittests/Basic such that the unit test
directory structure matches the library structure.  Reviewed by jyasskin.

llvm-svn: 125600
2011-02-15 21:30:27 +00:00
Jeffrey Yasskin cd3858b103 Add CMake support to the clang unittests.
llvm-svn: 125561
2011-02-15 07:54:28 +00:00
Zhanyong Wan e1dd3e2c31 Improves Clang's virtual file handling.
This patch contains:

- making some of the existing comments more accurate in the presence
of virtual files/directories.

- renaming some private data members of FileManager to match their roles better.

- creating 'DirectorEntry's for the parent directories of virtual
files, such that we can tell whether two virtual files are from the
same directory.  This is useful for injecting virtual files whose
directories don't exist in the real file system.

- minor clean-ups and adding comments for class
FileManager::UniqueDirContainer and FileManager::UniqueFileContainer.

- adding statistics on virtual files to FileManager::PrintStats().

- adding unit tests to verify the existing and new behavior of FileManager.

llvm-svn: 125384
2011-02-11 18:44:49 +00:00
Zhanyong Wan 392d2ed8a1 Fix a typo in a comment in tools/clang/unittests/Frontend/Makefile.
llvm-svn: 125182
2011-02-09 07:42:47 +00:00
Daniel Dunbar 74c9ea6343 build: Prevent duplicate inclusion of Makefile.rules, which causes make to warn
like crazy.
 - How no one else is bothered by this I can't understand!

llvm-svn: 124873
2011-02-04 17:12:27 +00:00
Jeffrey Yasskin c7da993dee Add gTest unittests to clang, and write the first one.
This is the Makefile version only; the cmake implementation is coming soon.

llvm-svn: 124777
2011-02-03 04:51:52 +00:00