Commit Graph

24 Commits

Author SHA1 Message Date
Ted Kremenek 8590544ea8 Add test cases for r98003 and r98006.
llvm-svn: 98008
2010-03-08 23:38:27 +00:00
Chandler Carruth 0354bf4405 Remove a few more references to index-test; this was killed in r94210.
llvm-svn: 94522
2010-01-26 05:36:44 +00:00
Daniel Dunbar 3c6d1b52a0 Remove clang-cc tool, it has joined in unholy union with clang.
- tools/driver will be renamed to tools/clang at some point.

llvm-svn: 91195
2009-12-12 00:56:47 +00:00
Daniel Dunbar 7b8fcadf68 CMake: Add support for running tests with valgrind.
llvm-svn: 89625
2009-11-22 21:55:22 +00:00
Daniel Dunbar 3b339a3aa3 Simplify.
llvm-svn: 86456
2009-11-08 09:46:39 +00:00
Daniel Dunbar 066967052c 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.

llvm-svn: 86421
2009-11-07 23:53:32 +00:00
Daniel Dunbar d3f630f4d5 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).

llvm-svn: 86139
2009-11-05 16:36:19 +00:00
Daniel Dunbar a3b52d7fb4 Add target_triple to Clang site configuration.
llvm-svn: 85881
2009-11-03 07:25:53 +00:00
Douglas Gregor d2eb58abac 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.

llvm-svn: 84263
2009-10-16 18:18:30 +00:00
Daniel Dunbar a87097a6ac Add the lib path to LD_LIBRARY_PATH, so finding .so works (more) portably.
llvm-svn: 82853
2009-09-26 07:36:09 +00:00
Daniel Dunbar a5840dbcb5 cmake: Run tests with 'verbose' enabled by default, so that the failure is
visible in the log.

llvm-svn: 82688
2009-09-24 07:18:36 +00:00
Daniel Dunbar 3967fca364 CMake: Add a clang-c++tests target for running the experimental C++ header
-fsyntax-only'ing tests.

llvm-svn: 82541
2009-09-22 10:07:55 +00:00
Daniel Dunbar a173d9b874 Include LLVM {src,obj} root in lit.site.cfg, to support non-standard layouts.
llvm-svn: 82401
2009-09-20 19:04:35 +00:00
Douglas Gregor 2436e7116b 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".

llvm-svn: 82166
2009-09-17 21:32:03 +00:00
Daniel Dunbar ecac0a408c 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.

llvm-svn: 82160
2009-09-17 19:55:53 +00:00
Douglas Gregor 8addadc691 CMake: Generate LIT site configuration file for Clang tests, which Daniel will probably have to fix
llvm-svn: 82086
2009-09-16 22:30:48 +00:00
Daniel Dunbar 3667b99af3 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. :)

llvm-svn: 77665
2009-07-31 05:54:17 +00:00
Douglas Gregor ed873d6767 Prepare CMake regression testing for Daniel's upcoming fix to the test runner
llvm-svn: 77223
2009-07-27 18:31:49 +00:00
Douglas Gregor c6d5edd2ed 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".

llvm-svn: 74704
2009-07-02 17:08:52 +00:00
Douglas Gregor 4dd5b57ef4 Fix regression testing in Xcode, again
llvm-svn: 73658
2009-06-17 23:35:04 +00:00
Douglas Gregor 274a6b4f2d Update Clang to include the InitializeAllTargets and
InitializeAllAsmPrinters LLVM headers. Also includes some minor fixes
for the CMake-based build with Xcode.

llvm-svn: 73544
2009-06-16 20:13:51 +00:00
Douglas Gregor 30018a6860 Switch CMake testing over to use Daniels new(er) Python-based infrastructure.
llvm-svn: 72977
2009-06-05 23:57:17 +00:00
Douglas Gregor fa93480937 Clean up Clang regression testing in CMake, so that we get more
logical output when running all of the Clang regression tests at once.

llvm-svn: 72947
2009-06-05 16:26:18 +00:00
Douglas Gregor 0770532f5a First cut at regression testing Clang with CMake
llvm-svn: 72945
2009-06-05 16:00:31 +00:00