Граф коммитов

47 Коммитов

Автор SHA1 Сообщение Дата
Andrew Trick 7140b3cde0 cmake+lit: final cleanup related to the recent churn
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133730 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 18:00:48 +00:00
Andrew Trick fc0f40acc6 Only do config-time substitution of LLVM_BUILD_MODE in
test/lit.site.cfg, not Unit/test/lit.site.cfg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133609 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 05:44:01 +00:00
Chandler Carruth fd8af77307 Add another dependency to the clang-test CMake target, this time to support lit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133138 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-16 02:21:11 +00:00
Chandler Carruth 4f5ef6e11f Add the new arcmt-test tool to the clang-test dependencies with
c-index-test and friends. This brings the failures on CMake clang tests
from 23 to 2 on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133137 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-16 02:01:48 +00:00
Douglas Gregor 6b07d31e41 Remove the clang-test-XXX targets from the CMake builds; they really aren't useful
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131728 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 15:01:17 +00:00
Douglas Gregor 9e63d4aed8 Nth time's a charm?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126461 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 00:46:48 +00:00
Douglas Gregor 02bba191ed CMake target check.deps only exists when LLVM_INCLUDE_TESTS
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126460 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 00:43:05 +00:00
NAKAMURA Takumi 378d2a110a CMake: Don't use ${CMAKE_CFG_INTDIR} for installed llvm-lit on Visual Studio.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126310 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-23 12:07:49 +00:00
Oscar Fuentes a3f787c32b Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126094 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 22:06:44 +00:00
Daniel Dunbar 299696c8c9 More correct fix for CMake breakage I was seeing, my buildbots use
LLVM_INCLUDE_TESTS:=OFF, which may no longer be necessary for all I know.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125985 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:55:32 +00:00
Daniel Dunbar 35eaa281af Unbreak CMake build on MSVC9, chapuni please check.
Without this I get:
--
-- Generating done
CMake Error: Unknown Target referenced : check.deps
CMake Error: Target: check-all depends on unknown target: check.deps
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125976 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:24:23 +00:00
NAKAMURA Takumi 652f1ef660 test/CMakeLists.txt: Don't depend on llvm toolchain at clang-standalone build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125646 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 03:07:10 +00:00
Peter Collingbourne 39d3e7a26c OpenCL: semantic analysis support for cl_khr_fp64 extension
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125588 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 19:46:23 +00:00
Jeffrey Yasskin 718b01d077 Add CMake support to the clang unittests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125561 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 07:54:28 +00:00
Peter Collingbourne f315fa81ee OpenCL: add support for __kernel, kernel keywords and EXTENSION,
FP_CONTRACT pragmas.  Patch originally by ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125475 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 01:42:53 +00:00
Oscar Fuentes ba43a4da6a Support running tests from the VS IDE and XCode.
Untested, but should work :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124975 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 21:37:51 +00:00
Oscar Fuentes 57ca32bbf0 Support `make clang-test' when Clang is compiled outside of LLVM.
This may not work on build platforms that place the binaries on
special folders ($build_dir/bin/Release/) such as the VS IDE and
XCode. For fixing this it is necessary to add a lit.py configuration
option for saying where the Clang binaries are, and apply to that path
the same magit that is used with the path to the LLVM tools binary
directory. Doing this requires a bit of autoconf work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124969 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 19:08:56 +00:00
NAKAMURA Takumi c3189e950e CMake: Fix test. CMake has not built unittests yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124787 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 09:01:12 +00:00
NAKAMURA Takumi f0d9d8b793 Add dependency to "make clang-test check-all".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121458 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 02:58:03 +00:00
Peter Collingbourne ced7671c18 Basic, Sema: add support for CUDA location attributes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120545 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-01 03:15:31 +00:00
NAKAMURA Takumi 3aa8c64305 test/CMakeLists.txt: Implement the target "check-all". For now, it has no dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120280 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29 01:18:56 +00:00
NAKAMURA Takumi c84aca4b50 test/CMakeLists.txt: Use ${LLVM_LIT_ARGS} and remove redundant arguments "-sv" and "--no-progress-bar".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118777 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 04:09:51 +00:00
Daniel Dunbar 2b1acd47e0 CMake: Clang test targets depend on the {FileCheck,not,count} tools.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109816 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 22:57:17 +00:00
Ted Kremenek f7507f29d7 Add test cases for r98003 and r98006.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98008 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 23:38:27 +00:00
Chandler Carruth dbdad6d933 Remove a few more references to index-test; this was killed in r94210.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94522 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:36:44 +00:00
Daniel Dunbar 864db01dec Remove clang-cc tool, it has joined in unholy union with clang.
- tools/driver will be renamed to tools/clang at some point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-12 00:56:47 +00:00
Daniel Dunbar e33f82f346 CMake: Add support for running tests with valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89625 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22 21:55:22 +00:00
Daniel Dunbar 30eb055802 Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 09:46:39 +00:00
Daniel Dunbar 1e63492a14 Rework site config for cmake to be generated at configure time, and only pass
the 'build_config' value in at runtime using the new lit runtime user parameter
feature.

This simplifies things and drops a dependency on 'sed', FWIW.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86421 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 23:53:32 +00:00
Daniel Dunbar b258d8f961 Add clang_site_config user variable, so that extra tests (e.g., utils/C++Syntax)
can always find the main clang site config (when invoked via CMake/Makefiles, at
least).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86139 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 16:36:19 +00:00
Daniel Dunbar e9a7323737 Add target_triple to Clang site configuration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85881 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03 07:25:53 +00:00
Douglas Gregor 52e7108f51 Add support for a chain of stat caches in the FileManager, rather than
only supporting a single stat cache. The immediate benefit of this
change is that we can now generate a PCH/AST file when including
another PCH file; in the future, the chain of stat caches will likely
be useful with multiple levels of PCH files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84263 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 18:18:30 +00:00
Daniel Dunbar 9e10cc7a4c Add the lib path to LD_LIBRARY_PATH, so finding .so works (more) portably.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82853 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-26 07:36:09 +00:00
Daniel Dunbar 584425c301 cmake: Run tests with 'verbose' enabled by default, so that the failure is
visible in the log.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82688 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 07:18:36 +00:00
Daniel Dunbar cceef8b89e CMake: Add a clang-c++tests target for running the experimental C++ header
-fsyntax-only'ing tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 10:07:55 +00:00
Daniel Dunbar 1b720a90f2 Include LLVM {src,obj} root in lit.site.cfg, to support non-standard layouts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82401 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-20 19:04:35 +00:00
Douglas Gregor 81b747b7fc Initial implementation of a code-completion interface in Clang. In
essence, code completion is triggered by a magic "code completion"
token produced by the lexer [*], which the parser recognizes at
certain points in the grammar. The parser then calls into the Action
object with the appropriate CodeCompletionXXX action.

Sema implements the CodeCompletionXXX callbacks by performing minimal
translation, then forwarding them to a CodeCompletionConsumer
subclass, which uses the results of semantic analysis to provide
code-completion results. At present, only a single, "printing" code
completion consumer is available, for regression testing and
debugging. However, the design is meant to permit other
code-completion consumers.

This initial commit contains two code-completion actions: one for
member access, e.g., "x." or "p->", and one for
nested-name-specifiers, e.g., "std::". More code-completion actions
will follow, along with improved gathering of code-completion results
for the various contexts.

[*] In the current -code-completion-dump testing/debugging mode, the
file is truncated at the completion point and EOF is translated into
"code completion".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 21:32:03 +00:00
Daniel Dunbar 7af18d359f Tweak clang testing.
- Move CMake to using the new test runner.

 - Switch Makefiles to use the lit.site.cfg.in template.

 - Remove explicit --path arguments, instead this gets written into the site
   configuration. This means running lit from the command line should use the
   exact same configuration as is used in 'make test', assuming it can find the
   site configuration file. You still need to run 'make test' (or the cmake
   build target equivalent) at least once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82160 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 19:55:53 +00:00
Douglas Gregor 95f29c2703 CMake: Generate LIT site configuration file for Clang tests, which Daniel will probably have to fix
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82086 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16 22:30:48 +00:00
Daniel Dunbar 1db467f120 MultiTestRunner: Simplify, cleanup, and rename!
- MultiTestRunner will eventually be renamed to 'lit', for LLVM integrated
   tester/testing. This has the pros of being pronouncable and short.

 - "Project" level configuration lives in 'lit.cfg', which is also what lit uses
   to find the root testing directory in some cases. This can be overridden for
   use in project files which want to precisely specify where things are.

 - TestRunner.py is not longer able to be invoked directly.
 
 - Moved some code to Util.py.

 - Introduced a configuration object.

 - Cleaned up --help, removed a few not-very-useful options.

 - Tried not to break anything that works. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77665 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 05:54:17 +00:00
Douglas Gregor 1b03350b23 Prepare CMake regression testing for Daniel's upcoming fix to the test runner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77223 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:31:49 +00:00
Douglas Gregor 2e22253e03 Add support for retrieving the Doxygen comment associated with a given
declaration in the AST. 

The new ASTContext::getCommentForDecl function searches for a comment
that is attached to the given declaration, and returns that comment, 
which may be composed of several comment blocks.

Comments are always available in an AST. However, to avoid harming
performance, we don't actually parse the comments. Rather, we keep the
source ranges of all of the comments within a large, sorted vector,
then lazily extract comments via a binary search in that vector only
when needed (which never occurs in a "normal" compile).

Comments are written to a precompiled header/AST file as a blob of
source ranges. That blob is only lazily loaded when one requests a
comment for a declaration (this never occurs in a "normal" compile). 

The indexer testbed now supports comment extraction. When the
-point-at location points to a declaration with a Doxygen-style
comment, the indexer testbed prints the associated comment
block(s). See test/Index/comments.c for an example.

Some notes:
  - We don't actually attempt to parse the comment blocks themselves,
  beyond identifying them as Doxygen comment blocks to associate them
  with a declaration.
  - We won't find comment blocks that aren't adjacent to the
  declaration, because we start our search based on the location of
  the declaration.
  - We don't go through the necessary hops to find, for example,
  whether some redeclaration of a declaration has comments when our
  current declaration does not. Similarly, we don't attempt to
  associate a \param Foo marker in a function body comment with the
  parameter named Foo (although that is certainly possible).
  - Verification of my "no performance impact" claims is still "to be
  done".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74704 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 17:08:52 +00:00
Douglas Gregor 6a6170ca75 Fix regression testing in Xcode, again
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73658 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 23:35:04 +00:00
Douglas Gregor ebfc180d9b Update Clang to include the InitializeAllTargets and
InitializeAllAsmPrinters LLVM headers. Also includes some minor fixes
for the CMake-based build with Xcode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73544 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 20:13:51 +00:00
Douglas Gregor 7986519527 Switch CMake testing over to use Daniels new(er) Python-based infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72977 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05 23:57:17 +00:00
Douglas Gregor f5dba388e7 Clean up Clang regression testing in CMake, so that we get more
logical output when running all of the Clang regression tests at once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72947 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05 16:26:18 +00:00
Douglas Gregor eb357b67b4 First cut at regression testing Clang with CMake
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72945 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05 16:00:31 +00:00