Commit Graph

468 Commits

Author SHA1 Message Date
Daniel Dunbar 9e406b4b60 Add a test for clang_rt support on Darwin. With appropriate massaging, this
checks that the runtime library can be linked and works for compiling on 10.6
for 10.{4,5,6} targets. Currently test is only for x86, and misses some
compiler-rt functions.

llvm-svn: 94083
2010-01-21 17:10:39 +00:00
Daniel Dunbar 0b9c603ee2 Tweak OptionalTests paths.
llvm-svn: 94082
2010-01-21 17:09:39 +00:00
Daniel Dunbar d723b01311 Add utils/OptionalTests, a dumping ground for additional (lit) tests which for
one reason or another don't belong in the regular test suite.

Inside is utils/OptionalTests/Extra which is specifically for tests that match
the layout of the regular tests.

llvm-svn: 94080
2010-01-21 16:55:39 +00:00
John McCall 6d11e07b16 Insert clang-flags into the clang command. Currently it needs to be a list;
future work should permit strings (by splitting them into a list o' strings).

llvm-svn: 93299
2010-01-13 06:44:51 +00:00
Mike Stump 4b0e352061 Remove unused code.
llvm-svn: 93262
2010-01-12 22:20:00 +00:00
Mike Stump a77e48c322 Improve covariance tester to randomize the return value more.
llvm-svn: 93254
2010-01-12 20:55:39 +00:00
Mike Stump edd224743c Add covariance tester.
llvm-svn: 93226
2010-01-12 03:01:18 +00:00
Mike Stump ee6dfe55a5 Allow N_FIELDS to be 0.
llvm-svn: 93211
2010-01-12 00:28:59 +00:00
Mike Stump b3ed45b67c Fix indentation.
llvm-svn: 93023
2010-01-08 19:28:41 +00:00
Mike Stump 9620622431 Add in final overrider logic.
llvm-svn: 93022
2010-01-08 19:25:36 +00:00
Mike Stump a52cf2ca3f Add checker for type infos.
llvm-svn: 92956
2010-01-07 22:50:03 +00:00
Mike Stump 0015eb93c6 Add checked for VTTs.
llvm-svn: 92954
2010-01-07 22:28:10 +00:00
Mike Stump 24e9b0048c Detailed vtable checker.
llvm-svn: 92953
2010-01-07 22:21:26 +00:00
Mike Stump 441793352d 1/2 off all structs should not have any virtual functions.
Replace magic numbers with uuids.

llvm-svn: 92941
2010-01-07 20:55:28 +00:00
Mike Stump 2a83635337 Add a descriptive tag to each line to make the exact differences
easier to understand.

llvm-svn: 92932
2010-01-07 19:39:43 +00:00
Mike Stump bd0c5da5fc Don't use two argument mixing function.
llvm-svn: 92929
2010-01-07 19:24:27 +00:00
Mike Stump a771b0ad52 Also generate the .s files.
llvm-svn: 92928
2010-01-07 19:19:39 +00:00
Mike Stump 53b926c56f Add a testcase generator for vtable/rtti testing. WIP.
llvm-svn: 92927
2010-01-07 18:58:28 +00:00
Daniel Dunbar 54f330f342 Tests: Tweak LLVM-Code-Symbols test to ignore common and undefined symbols for
now, let's start small.

llvm-svn: 92170
2009-12-26 22:58:48 +00:00
Daniel Dunbar c19b219280 Sketch a simple new C++Tests suite for checking that llvm-gcc and clang generate
the same visible symbols, useful for finding ABI/Mangler/vtable/etc. issues.

llvm-svn: 92147
2009-12-24 21:27:38 +00:00
Douglas Gregor 53982d577d Don't commit my silly little local changes
llvm-svn: 92010
2009-12-23 17:43:32 +00:00
Douglas Gregor e6600379b1 Fix DISABLE_SMART_POINTERS build
llvm-svn: 92008
2009-12-23 17:40:29 +00:00
Douglas Gregor 39740dce30 Revert accidental commit
llvm-svn: 91930
2009-12-22 22:30:51 +00:00
Douglas Gregor b6ea60872d Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequence
llvm-svn: 91927
2009-12-22 22:17:25 +00:00
Daniel Dunbar d2d3c7efe3 C++Tests: Add target paths for LLVM-Code-Compile checks as well.
llvm-svn: 91716
2009-12-18 21:27:23 +00:00
Douglas Gregor 95a438b291 Add a couple more paths to the LLVM-Code-Syntax test
llvm-svn: 91627
2009-12-17 21:51:02 +00:00
Douglas Gregor 4881735736 Remove accidental commit containing local paths for the LLVM-Code-Syntax test
llvm-svn: 91326
2009-12-14 20:58:24 +00:00
Douglas Gregor 4f84661c43 Minor cleanups for constructor initialization in InitializationSequence
llvm-svn: 91325
2009-12-14 20:57:13 +00:00
Douglas Gregor 9221e646f5 Switch the Emacs clang-completion-mode over to clang -cc1
llvm-svn: 91185
2009-12-11 23:47:56 +00:00
Daniel Dunbar 520d1e6c6b Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.
llvm-svn: 91176
2009-12-11 23:04:35 +00:00
Douglas Gregor 96156a46e0 Beef up Clang-on-LLVM testing a bit, by making LLVM-Syntax recursive
(since we now parse all of the headers appropriately) and teaching
LLVM-Code-Syntax about the extra paths needed to parse the backends.

llvm-svn: 91068
2009-12-10 22:08:55 +00:00
Daniel Dunbar bdd9669310 Add utils/TestUtils, and sink pch-test.pl there.
Also, add a test for generator a C file with a very deep call stack.

llvm-svn: 90468
2009-12-03 18:40:58 +00:00
Kovarththanan Rajaratnam cb58439f34 Tuck away scan-build related files into tools/scan-build
llvm-svn: 90215
2009-12-01 06:52:01 +00:00
Kovarththanan Rajaratnam 63585ddf9d Move ubiviz to analyzer directory
llvm-svn: 90213
2009-12-01 06:34:06 +00:00
Daniel Dunbar 0ec57ff203 Don't run the LLVM Code tests by default.
llvm-svn: 89937
2009-11-26 05:09:00 +00:00
Daniel Dunbar 9acb35a5e8 Add -Werror for Clang and LLVM on Clang (headers) syntax tests.
llvm-svn: 89936
2009-11-26 05:08:53 +00:00
Douglas Gregor 20d58fbd3a Add C++ tests to try to parse and compile the LLVM libraries
llvm-svn: 89923
2009-11-26 02:28:53 +00:00
Douglas Gregor 4f5d0907b8 Don't try to parse LinkAllParses.h for now
llvm-svn: 89820
2009-11-25 00:31:20 +00:00
Ted Kremenek 4d1907c493 Remove '-checker-simple' reference from scan-build. Patch by Kovarththanan Rajaratnam!
llvm-svn: 89673
2009-11-23 17:37:58 +00:00
Daniel Dunbar baa74770c9 Change Clang-Code-Compile tests to only -emit-llvm instead of running
codegen/as.

llvm-svn: 89634
2009-11-23 00:07:14 +00:00
Daniel Dunbar 5ad7e15698 Add two new C++ lit tests suites, for testing Clang .cpp files with
-fsyntax-only and with -c.

llvm-svn: 88845
2009-11-15 08:10:41 +00:00
Daniel Dunbar 4de54f823b Add Clang-Syntax C++Tests; these don't run by default, use the lit arguments
'--param run_clang_syntax=1' to run them.

llvm-svn: 88839
2009-11-15 07:23:09 +00:00
Daniel Dunbar 1566a2257f Use the other excludes syntax.
llvm-svn: 88836
2009-11-15 07:11:12 +00:00
Ted Kremenek 9f2ee2bb26 Use 'eq' operator, and enable regular experimental checks when --experimental-checks is passed to scan-build.
llvm-svn: 88673
2009-11-13 18:49:48 +00:00
Ted Kremenek 4ef13f8ac9 Add clang-cc option "--analyzer-experimental-internal-checks". This
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.

llvm-svn: 88671
2009-11-13 18:46:29 +00:00
Douglas Gregor 6af6c3ee56 Turn off -Wsign-compare warnings by default
llvm-svn: 86233
2009-11-06 05:24:12 +00:00
Douglas Gregor 02ba0ea461 When we encounter a derived-to-base conversion when performing an
implicit conversion sequence, check the validity of this conversion
and then perform it.

llvm-svn: 86210
2009-11-06 01:02:41 +00:00
Douglas Gregor 3ec1bf240d Fixed two places where we needed to force completion of a type
(without complaining if it fails) to get proper semantics: reference
binding with a derived-to-base conversion and the enumeration of
constructors for user-defined conversions. There are probably more
cases to fix, but my prior attempt at statically ensuring that
complete-type checking always happens failed. Perhaps I'll try again.

With this change, Clang can parse include/llvm/*.h!

llvm-svn: 86129
2009-11-05 13:06:35 +00:00
Douglas Gregor 8413751fab Experimental, ultra-hacking Emacs minor mode for Clang-based code completion.
llvm-svn: 83681
2009-10-09 22:17:40 +00:00
Ted Kremenek 05e6f5b6e9 Turn on 'RegionStore' as the default store manager both for 'clang --analyze' and 'scan-build'. Leave 'BasicStore' as the default store manager in 'clang-cc'. While there are still known warts with RegionStore, it's ready to be tested by general users.
llvm-svn: 82752
2009-09-25 05:55:59 +00:00
Daniel Dunbar b5cbf77c2e Remove old test runner, this has moved to LLVM/utils/lit and all known clients
have been updated.
 - Please let me know of any problems.

llvm-svn: 82524
2009-09-22 05:16:02 +00:00
Daniel Dunbar be657e5b28 A toy for Doug: Add some 'lit' tests which just run clang++ -fsyntax-only over all the files in a directory.
- 'lit utils/C++Tests' to run, you may need to fix the stdc++ include path, and your mileage may vary.

 - A handful of the LLVM headers are XFAIL because they don't include the right headers.

llvm-svn: 81990
2009-09-16 01:40:13 +00:00
Daniel Dunbar 56b534d2d6 Also compare stdout and stderr lines.
llvm-svn: 81018
2009-09-04 18:35:09 +00:00
Daniel Dunbar 156fa7dde0 Make CmpDriver less stupid.
llvm-svn: 81012
2009-09-04 17:41:47 +00:00
Daniel Dunbar 79ee0fa59c Add a valgrind suppressions file for x86_64-pc-linux-gnu and gcc-4.3.3 which
suppresses the overlapped memcpy in stable_sort that clang triggers.

llvm-svn: 80982
2009-09-04 02:53:57 +00:00
Daniel Dunbar 3009f81d1d Add --vg-arg option to clang test runner.
- Passes additional argument through to valgrind.

Also, don't run valgrind with --leak-check=no by default.

llvm-svn: 80981
2009-09-04 02:53:50 +00:00
Anders Carlsson 115d6bfcac Whoops, did not mean to commit this
llvm-svn: 79201
2009-08-16 20:29:59 +00:00
Anders Carlsson a471db0dd4 Store the delete operator for delete expressions.
llvm-svn: 79200
2009-08-16 20:29:29 +00:00
Benjamin Kramer 312fde6420 lit: flush stdout in no-fancy-progress-bar mode as well.
llvm-svn: 79056
2009-08-14 23:34:45 +00:00
Ted Kremenek d0d7256b8f Pass '-Wno-' options to clang-cc. This fixes <rdar://problem/6943988>.
llvm-svn: 79011
2009-08-14 18:20:50 +00:00
Daniel Dunbar 1a9db99932 Add a simple tool for comparing two static analyzer runs, primarily for use from
buildbot.

llvm-svn: 78336
2009-08-06 21:15:33 +00:00
Daniel Dunbar 4728100e8d Fix locating the 'lit.cfg' file when running on only a single file in the
current directory.

llvm-svn: 78271
2009-08-06 01:41:03 +00:00
Ted Kremenek 36c14a0f1a Renable "html" indexing by default.
llvm-svn: 78077
2009-08-04 17:05:18 +00:00
Daniel Dunbar 83142021fb lit: Some sample tests, for testing the tester
llvm-svn: 78050
2009-08-04 04:40:15 +00:00
Ted Kremenek ba8d7fc6bf Recognize '-M' and '-MM' options.
llvm-svn: 78027
2009-08-04 00:57:12 +00:00
Ted Kremenek 90fc8a492e 'unlink' file directly instead of invoking system shell.
llvm-svn: 78026
2009-08-04 00:55:59 +00:00
Ted Kremenek 90e2e07bd5 Have scan-build clue off of 'BUGMETAEND' to know when to stop processing an HTML file.
llvm-svn: 78022
2009-08-03 23:45:27 +00:00
Daniel Dunbar f0e2ea2869 lit: Don't treat '\' as an escape in unquoted strings, on Win32. This turns out
to not be a very good idea.

llvm-svn: 77957
2009-08-03 05:29:22 +00:00
Ted Kremenek 7ac29bb2d8 Include '-o' arguments in verbose output.
llvm-svn: 77881
2009-08-02 05:42:46 +00:00
Daniel Dunbar 6cfaa47c85 lit: Catch (internal) exceptions when using --no-sh.
llvm-svn: 77830
2009-08-01 23:18:27 +00:00
Daniel Dunbar 5a283bf848 lit: Fix thinko in finding config file.
llvm-svn: 77828
2009-08-01 23:09:12 +00:00
Daniel Dunbar 590c358681 lit: Add internal script execution.
- Off by default, you can test it with the --no-sh argument.

 - For me it works for all but 3 tests, but there a number of FIXMEs and QOI
   issues:  
     o Redirection isn't completely accurate -- in practice it can't portably
       be, but I would like to error out if someone writes something which isn't
       going to work. This is the source of the 3 test failures.

     o Some pipe configurations have the potential to deadlock.

     o It is significantly slower when multithreaded. I believe this is due to
       locking happening under the hood, there is probably some kind of solution
       but I haven't investigated yet.

     o Log output is ugly.

llvm-svn: 77784
2009-08-01 10:18:01 +00:00
Daniel Dunbar 82fa6f5e9d lit: Two more sh lex/parse bugs (but its so simple!)
- Empty arguments weren't handled correctly.
 - Escapes outside quoted strings weren't handled.

llvm-svn: 77783
2009-08-01 09:41:09 +00:00
Daniel Dunbar 1661066e58 lit: Fix two sh lexing bugs.
- '\\\\' inside a "..." string becomes '\\'.
 - The '<' token wasn't being recognized.

llvm-svn: 77777
2009-08-01 05:52:04 +00:00
Daniel Dunbar dc4a0f7427 lit: Fix a name lookup problem, which only occurred on a race condition. This is
why dynamic binding sucks.

llvm-svn: 77773
2009-08-01 04:11:36 +00:00
Daniel Dunbar 3ee0543e67 lit: Pull a few more variables into the TestingConfig object.
llvm-svn: 77772
2009-08-01 04:06:02 +00:00
Daniel Dunbar 5332311370 lit: Don't use threads when only running one test, or with -j 1.
llvm-svn: 77766
2009-08-01 03:35:40 +00:00
Daniel Dunbar 2653167290 MultiTestRunner: Add 'sh' parsing to ShUtil.
llvm-svn: 77765
2009-08-01 03:22:27 +00:00
Daniel Dunbar cd4c338437 MultiTestRunner: Fix invalid warning when pointing 'lit' directly at a test.
llvm-svn: 77690
2009-07-31 18:12:18 +00:00
Daniel Dunbar 1087599185 MultiTestRunner: Add module for lexing 'sh' commands.
llvm-svn: 77668
2009-07-31 07:59:05 +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
Ted Kremenek bfe393fa0a Add scan-build option '-no-failure-reports' to supress the creation of a 'failures' subdirectory that includes crash reports, preprocessed files, etc.
llvm-svn: 77644
2009-07-30 23:55:19 +00:00
Daniel Dunbar ba848438e3 MultiTestRunner: Stop printing XFAILs on every run, this doesn't really have any
value.

llvm-svn: 77566
2009-07-30 01:57:45 +00:00
Daniel Dunbar 0a1fa85894 scan-build: Don't try to index plist-html output directories
llvm-svn: 77465
2009-07-29 16:21:23 +00:00
Douglas Gregor 436081940c Make the Python TestRunner work for individual tests
llvm-svn: 77456
2009-07-29 15:32:08 +00:00
Daniel Dunbar 1cb8d81b41 MultiTestRunner: Reenable --vg option.
- Simplified from before and using --error-exitcode so failures show up as
   failures.

llvm-svn: 77424
2009-07-29 02:57:25 +00:00
Ted Kremenek 0799d4f0bb Only generate preprocessed files during crashes using Clang, not GCC.
llvm-svn: 77281
2009-07-28 00:14:21 +00:00
Ted Kremenek 5cc54863ce Add scan-build support for 'plist-html', a hybrid mode that supports the
creation of both HTML and plist files. Plist files are currently not generated
using the same layout algorithm as just specifying '-plist', so this is mainly
intended to help support automated runs of the analyzer.

llvm-svn: 77263
2009-07-27 22:10:34 +00:00
Daniel Dunbar b8aa9589bb Tweak MultiTestRunner --path argument.
- Accept multiple values instead of embedding separator.
 - Make sure this gets used when searching for 'clang' binary.
 - Switch makefiles to using --path to stay in sync with cmake.

llvm-svn: 77234
2009-07-27 19:01:13 +00:00
Daniel Dunbar 605bd11311 MultiTestRunner: Make sure to point at src dir, for out of tree builds.
Factor out routine for executing the script commands.

llvm-svn: 77075
2009-07-25 15:26:08 +00:00
Daniel Dunbar 4edf8a17d5 MultiTestRunner: Cleanup test execution & output.
- Stop writing everything to files.

 - Make test output more standard.

llvm-svn: 77074
2009-07-25 14:46:05 +00:00
Daniel Dunbar f7e06f946c MultiTestRunner: Drop external script and DejaGNU compatibility options for now.
- We don't use the former, and the latter doesn't actually work.

llvm-svn: 77073
2009-07-25 13:19:40 +00:00
Daniel Dunbar 6db90064f8 MultiTestRunner: Disable valgrind support for now, I don't feel like maintaining
it currently.

llvm-svn: 77072
2009-07-25 13:13:06 +00:00
Daniel Dunbar a2f6b0dde0 MultiTestRunner/Win32: Add SYSTEMROOT to environment, replace '&&' in .bat
files.

llvm-svn: 77071
2009-07-25 12:57:15 +00:00
Daniel Dunbar 595c98729b Make having no RUN line a failure.
Doug, please look at decltype-crash and instantiate-function-1.mm, I'm not sure
if they are actually testing the right thing / anything.

llvm-svn: 77070
2009-07-25 12:47:38 +00:00
Daniel Dunbar 011e3c9905 Remove this Makefile, it is unused.
llvm-svn: 77067
2009-07-25 12:37:21 +00:00
Daniel Dunbar 6c6c0e1769 MultiTestRunner: Oops, clang wasn't being substituted properly. This is why the
cxx-using-declaration test case started exhibiting different behavior. It still
needs to be fixed, however...

llvm-svn: 77066
2009-07-25 12:23:35 +00:00
Daniel Dunbar e87599356f MultiTestRunner: Always use absolute path names for tests.
Also, fix a function name I forgot to update.

llvm-svn: 77064
2009-07-25 12:05:55 +00:00
Daniel Dunbar 97ea867690 MultiTestRunner: Validate '&&' at the end of RUN lines.
- This is just to normalize, these will go away soon hopefully.

Added all the missing '&&'s that have crept in. :)

llvm-svn: 77062
2009-07-25 11:27:37 +00:00
Daniel Dunbar 3ab3b5e17a MultiTestRunner: Explicitly define child environment, the only variable we need
to import is the PATH.

llvm-svn: 77061
2009-07-25 10:14:19 +00:00