Commit Graph

440 Commits

Author SHA1 Message Date
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
Daniel Dunbar 3c2da2bb7e MultiTestRunner.py improvements.
- Tweak output directories for temp files, derive the temporary base from the
   test's parent directory name, and the test name (instead of the whole path).

llvm-svn: 77059
2009-07-25 09:53:43 +00:00
Daniel Dunbar e6475f1192 MultiTestRunner.py improvements.
- Not improved: the horribly lousy name. :)

 - Suppress stderr when capturing output.

 - Rewrite which() to do the right PATH search instead of being lazy and
   shelling out to 'which'.

 - On Windows, run scripts as batch files (via 'cmd /c ...').

llvm-svn: 77058
2009-07-25 09:42:24 +00:00
Anders Carlsson e9e9abb2fb Whoops, did not mean to check this in.
llvm-svn: 77022
2009-07-25 00:26:00 +00:00
Anders Carlsson 87a9a34e5b More work on the constant struct builder. We now try to layout all constant structs but throw away the result.
llvm-svn: 77021
2009-07-25 00:24:56 +00:00
Ted Kremenek cd31df0f3f Enable the '-warn-security-syntactic' checker option by default.
llvm-svn: 76933
2009-07-24 02:52:07 +00:00
Ted Kremenek c3fd33014c Remove bogus check.
llvm-svn: 76259
2009-07-17 22:45:54 +00:00
Ted Kremenek 1d67c22949 Add error message when clang-cc cannot be found.
llvm-svn: 76256
2009-07-17 22:38:26 +00:00
Daniel Dunbar dde5c8d522 Add extra print for --time-tests output.
llvm-svn: 76104
2009-07-16 21:18:21 +00:00
Daniel Dunbar 047f00ca4a Make stdin for test scripts empty, so that tests don't accidentally hang waiting
for stdin.

llvm-svn: 75506
2009-07-13 21:24:28 +00:00
Daniel Dunbar 5ae1e029f4 Add --time-tests option to test runner, for profiling 'make test'.
llvm-svn: 75396
2009-07-11 22:46:27 +00:00
Nuno Lopes 14ea24e422 restore proper valgrind support.
disclaim: I know nothing about Python, so apologies in advance if I break something

llvm-svn: 75368
2009-07-11 18:34:43 +00:00
Eli Friedman 837f574ee9 Use /usr/bin/env trick to find python. Patch by Krister Walfridsson.
llvm-svn: 75271
2009-07-10 20:15:12 +00:00
Argyrios Kyrtzidis 1561c6cf54 Having tests that depend on previously created files is bad idea. Fix them to be self-sufficient.
llvm-svn: 74810
2009-07-06 00:03:47 +00:00
Argyrios Kyrtzidis 5641111e3f Make use of the Index library through the index-test tool.
'index-test' is now able to provide additional info for a Decl, through multiple AST files:
-Find declarations
-Find definitions
-Find references

llvm-svn: 74803
2009-07-05 22:22:35 +00:00
Daniel Dunbar 43d74cd948 Revert prev commit, we have much bigger problems because 2.3 is missing
the subprocess module.

llvm-svn: 74738
2009-07-02 23:58:07 +00:00
Daniel Dunbar 22da185ed8 Avoid @staticmethod to allow use with Python 2.3.
llvm-svn: 74737
2009-07-02 23:56:37 +00:00
Daniel Dunbar 3f460e84d0 Testing improvements:
- Make python test runner force COLUMNS=0 to increase determinism.

 - Substitute clang-cc as we do for clang.

 - Improved detection of Ctrl-C.

 - Honor CLANG and CLANGCC environment variables.

 - Add proper command line arguments to TestRunner.py (see --help)

llvm-svn: 73640
2009-06-17 21:33:37 +00:00
Douglas Gregor dca24385f3 If any tests fail, the test runner returns a status code of 1
llvm-svn: 73584
2009-06-16 23:40:23 +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 278f52ec29 Refactor and clean up the AST printer, so that it uses a DeclVisitor,
walks through DeclContexts properly, and prints more of the
information available in the AST. The functionality is still available
via -ast-print, -ast-dump, etc., and also via the new member functions
Decl::dump() and Decl::print().

llvm-svn: 72597
2009-05-30 00:08:05 +00:00
Eli Friedman 1fd785f564 Minor build system changes to make ABITest work correctly on Linux.
llvm-svn: 72405
2009-05-25 22:07:09 +00:00
Eli Friedman 1cae3df3cf Some minor corrections: don't use offsetof on a bitfield, and cast
printf operands to long to suppress warnings.

llvm-svn: 72404
2009-05-25 21:38:01 +00:00
Ted Kremenek eef7a21507 Add hack to scan-build to fix PR 4215
(http://llvm.org/bugs/show_bug.cgi?id=4215): When xcodebuild is invoked with
-sdk iphonesimulator3.0, use gcc-4.2 instead of the system default gcc.

llvm-svn: 71891
2009-05-15 21:14:16 +00:00
Ted Kremenek 46727df06a Re-enable passing analyzer options from scan-build to ccc-analyzer.
llvm-svn: 71836
2009-05-15 04:20:31 +00:00
Ted Kremenek f9903da7fa Don't strip quotes in compiler line for -D arguments.
Fixes PR 4205.

llvm-svn: 71835
2009-05-15 04:07:18 +00:00
Ted Kremenek 3c2775f0b0 Make scan-build process of --use-cc and --html-title more robust.
llvm-svn: 71567
2009-05-12 18:04:43 +00:00
Ted Kremenek 25421bb8f6 Use Text::ParseWords to make 'clang -###' parsing more robust.
llvm-svn: 71504
2009-05-11 23:29:51 +00:00
Daniel Dunbar a3bb6f2e5b Tweak this non-default test so it still works w/ x86 feature support.
llvm-svn: 71494
2009-05-11 23:11:21 +00:00
Ted Kremenek dc99ec4ebd ccc-analyzer should only analyze C and Objective-C files.
llvm-svn: 71474
2009-05-11 21:08:34 +00:00
Ted Kremenek 1f991f09df Add total hack to get scan-build working again. ccc-analyzer calls
'clang -###' to get the appropriate arguments to pass to clang-cc.
This isn't a permanent solution.

llvm-svn: 71364
2009-05-09 19:19:28 +00:00
Daniel Dunbar 793cc3e0c3 ABITest: Improve test driver marginally, to allow running a specific
test index.

llvm-svn: 71295
2009-05-08 23:40:45 +00:00
Daniel Dunbar 3a53b857d0 ABITest: Move more of the common Makefile bits into the common
Makefile.

llvm-svn: 71274
2009-05-08 22:49:52 +00:00
Daniel Dunbar 811e62c8c1 ABITest: Fix a bug in generating test values for structures w/ no
non-padding fields.

llvm-svn: 71273
2009-05-08 22:48:39 +00:00
Daniel Dunbar 51c4bc320e ABITest: Move default set of test args into common makefile.
Also, tweak default list of bit-fields to try.

llvm-svn: 71246
2009-05-08 20:10:52 +00:00
Daniel Dunbar 766004f179 Add various other bits I use to run ABITest.
llvm-svn: 71201
2009-05-08 00:49:21 +00:00
Daniel Dunbar 5bcbf1ccbd Add to the house of cards that is ABITestGen.
- Support generating structures with bit-fields.

llvm-svn: 71192
2009-05-07 23:19:55 +00:00
Ted Kremenek ce6b865c21 ccc-analyzer: Don't automatically generate 'Parser Rejects' files anymore. The
frontend is far enough along that most discrepancies between Clang and GCC are
(at least for C and Objective-C) are intentional. We also now have codegen to
test the frontend.

llvm-svn: 70303
2009-04-28 17:37:44 +00:00
Douglas Gregor 70091b8f43 Some fixes for PCH (de-)serialization of Objective-C AST nodes:
- Deal with the Receiver/ClassInfo shared storage in ObjCMessageExpr
  - Implement PCH support for ImplicitParamDecl
  - Fix the handling of the body of an ObjCMethodDecl
  - Several cast -> cast_or_null fixes
  - Make Selector::getIdentifierInfoForSlot work for 1-argument, NULL
  selectors.
  - Make Selector::getAsString() work with NULL selectors.
  - Fix the names of VisitObjCAtCatchStmt and VisitObjCAtFinallyStmt
  in the PCH reader and writer; these were never getting called.

At this point, all of the pch-test tests pass for C and Objective-C.

llvm-svn: 70163
2009-04-26 22:20:50 +00:00
Douglas Gregor 1d46a1f8a5 Simple little smoke-test script that tries to build PCH files and then
dump their contents for all of the compilable tests in Clang's
testsuite. All of the tests pass for C, but there are still many
failures for Objective-C.

llvm-svn: 70110
2009-04-26 03:52:11 +00:00
Daniel Dunbar 885db54671 Make this code a little more generic.
llvm-svn: 70103
2009-04-26 01:28:51 +00:00
Daniel Dunbar dec9e1ec5e Don't build error/warning/assertion detection in the testing script.
- This wasn't actually all that useful and isn't worth the extra
   (hard)code.

llvm-svn: 69869
2009-04-23 05:03:44 +00:00
Ted Kremenek 9ebfe91dea ccc-analyzer: Don't create preprocessed files about the ignored 'cdecl' attribute. We know Clang doesn't support it yet.
llvm-svn: 69802
2009-04-22 13:42:27 +00:00
Daniel Dunbar 44ea0b2e0e Update this (non-default) test case.
llvm-svn: 69636
2009-04-20 23:53:56 +00:00
Daniel Dunbar c0a4ea0c02 Remove CheckBuiltinMacros script, obsoleted since we support -dM now.
llvm-svn: 68990
2009-04-13 21:26:41 +00:00
Daniel Dunbar 497ff13243 Support -miphoneos-version-min in clang-cc.
- Patch by Shantonu Sen (with a minor tweak to split out
   getDarwin{OSX,IPhoneOS}Defines)!

 - <rdar://problem/6776277> Need clang-cc/ccc-analyzer support for
   -miphoneos-version-min

llvm-svn: 68815
2009-04-10 19:52:24 +00:00
Daniel Dunbar e3f4197524 Support %S in Python TestRunner
llvm-svn: 68814
2009-04-10 19:49:21 +00:00
Daniel Dunbar 17ddaa677e More fixes to builtin preprocessor defines.
- Add -static-define option driver can use when __STATIC__ should be
   defined (instead of __DYNAMIC__).

 - Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz.

 - Set __NO_INLINE__ following GCC 4.2.

 - Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2.

 - Set __EXCEPTIONS for Objective-C NonFragile ABI.

 - Set __STRICT_ANSI__ for standard conforming modes.

 - I added a clang style test case in utils for this, but its not
   particularly portable and I don't think it belongs in the test
   suite.

llvm-svn: 68621
2009-04-08 18:03:55 +00:00
Daniel Dunbar d7beeea228 Handle use side of __objc_exception__ attribute; when using an
exception with this attribute we don't need to emit a weak definition
for the exception type information.

llvm-svn: 68513
2009-04-07 06:43:45 +00:00
Ted Kremenek 554b5370e4 scan-build: Also look for clang-cc in ../libexec
llvm-svn: 67972
2009-03-29 00:31:32 +00:00
Ted Kremenek 97eaaddc22 More path updates with clang-cc...
llvm-svn: 67609
2009-03-24 05:30:14 +00:00
Ted Kremenek c13a6bc593 Update scan-build/ccc-analyzer to use 'clang-cc' instead of 'clang'.
llvm-svn: 67608
2009-03-24 04:29:13 +00:00
Ted Kremenek 3759754363 '-o' option now supports relative paths.
llvm-svn: 66680
2009-03-11 18:20:33 +00:00
Ted Kremenek 6f74418bd7 scan-build: Also look for clang in the same directory as scan-build.
llvm-svn: 66491
2009-03-09 23:14:38 +00:00
Daniel Dunbar fe5b7bc5ef Add my "clang compatible" test runner. Sorry for keeping this to myself...
Usage: from clang/test, 'make -f ../utils/test/Makefile.multi'

Pros: About 20% faster than the Makefile based version on my 8 core
box (way faster on Windows I imagine, if it works).

Cons: Needs some cleanup. Ctrl-C works quite poorly on Darwin; more
Python's fault than mine.

Future: Support config definitions so we can use this for running LLVM
tests instead of dejagnu. Parallel testing goodness? Indeed.

llvm-svn: 66293
2009-03-06 22:20:40 +00:00
Daniel Dunbar 7c5a8d2fa0 Add a little utility for interposing between a command line program
and capturing its invocations.

llvm-svn: 66068
2009-03-04 21:06:52 +00:00
Daniel Dunbar b4e80a5b19 ABITestGen: Add v2i16 and v16f32 as default vector types to generate.
llvm-svn: 65810
2009-03-02 06:14:33 +00:00
Ted Kremenek 078b8879e7 Don't report 'Parser Rejects' for conftest files.
llvm-svn: 65619
2009-02-27 06:17:38 +00:00
Ted Kremenek 33b220510b Correctly check for ccc-analyzer in the same directory as scan-build.
llvm-svn: 65618
2009-02-27 06:17:05 +00:00
Ted Kremenek 1b44ba4295 Pass -ffreestanding' to clang.
llvm-svn: 65584
2009-02-26 23:09:43 +00:00
Ted Kremenek 721c3c5f70 For scan-build based analyses, use the '-analyzer-eargely-assume' setting by default (turning it on to test how it impacts users).
llvm-svn: 65535
2009-02-26 17:36:31 +00:00
Ted Kremenek 16f3d8dcfb scan-build now looks for ccc-analyzer first in the 'bin' subdirectory and then the directory where scan-build lives.
llvm-svn: 65483
2009-02-25 22:54:02 +00:00
Ted Kremenek 32a59b2315 Do not automatically run the 'missing -dealloc' check until we have adequate time to make it much smarter (too much noise).
llvm-svn: 65474
2009-02-25 21:08:30 +00:00
Ted Kremenek 86cb75a7cc Fix condition in ccc-analyzer that would cause the analyzer never to be run.
llvm-svn: 65417
2009-02-25 00:10:37 +00:00
Ted Kremenek 9b15effcd1 ccc-analyzer: Don't analyze files with '-arch ppc' or '-arch ppc64' since Clang
doesn't support Altivec intrisics nor is it likely that we're currently
generating all the right #defines, etc., for those architectures.

llvm-svn: 65390
2009-02-24 22:07:12 +00:00
Daniel Dunbar d2fd196045 Add a very primitive clang based multifile 'delta'.
- Interface is more or less like multidelta.

 - Keep in mind it won't work very well; delta is O(N^2) frequently in
   practice. multidelta manages to work because it folds lines to keep
   N small, but this is just working on raw tokens. However, I have a
   fancy pants DAG based delta algorithm which will be the bees knees
   once I get it wired to clang.

llvm-svn: 65377
2009-02-24 07:42:32 +00:00
Ted Kremenek 6e79f3129e scan-build: Prune off any trailing '/' characters in the output directory path.
llvm-svn: 65368
2009-02-24 02:38:02 +00:00
Ted Kremenek 04c6f05a1c Find 'clang' in 'bin' subdirectory instead of 'cbin'.
llvm-svn: 65343
2009-02-23 23:01:06 +00:00
Daniel Dunbar 12bbe9e144 Goodbye old-ccc; please use tools/ccc/ccc.
llvm-svn: 65335
2009-02-23 19:17:09 +00:00
Daniel Dunbar 3ebd531b2c ABITestGen: Use explicit list of vector types instead of just a list
of sizes. Turns out we don't care very much about vector types that
don't map to the hardware.

llvm-svn: 65263
2009-02-22 04:17:53 +00:00
Ted Kremenek 3f49f0f06d Update scan-build help diagnostic.
llvm-svn: 65223
2009-02-21 04:46:41 +00:00
Ted Kremenek 6b8b0dfb90 Only create a preprocessed file for an ignored attribute if there currently does not exist an 'attribute_ignored_XXX.txt' file for that attribute.
llvm-svn: 65222
2009-02-21 04:46:20 +00:00
Ted Kremenek b98f0eb9af Make 'RangeConstraintManager' the default ConstraintManager.
llvm-svn: 65173
2009-02-20 21:49:22 +00:00
Ted Kremenek 40cd13ecff Fix potential use of uninitialized variable.
llvm-svn: 65109
2009-02-20 04:34:29 +00:00
Ted Kremenek 52932d725a scan-build now searches for the clang binary in the subdirectory 'cbin'.
llvm-svn: 65014
2009-02-19 04:58:30 +00:00
Ted Kremenek 13ed6f1ebe ccc-analyzer:
- now logs which source files had "ignored attributes".
- disable-free is enabled

scan-build:
- now displays a table of ignored attributes under "Analyzer Failures".

llvm-svn: 64853
2009-02-17 23:31:05 +00:00
Daniel Dunbar 79d10a2f43 ABITest: Add some checking of values for return types; useful for
catching internal consistency problems (esp. w/ reference compiler).

llvm-svn: 64847
2009-02-17 23:13:43 +00:00
Daniel Dunbar 45f68153d3 Note some more things to integrate into ABITest
llvm-svn: 64846
2009-02-17 23:12:22 +00:00
Ted Kremenek d3d16aaa48 Fix broken line.
llvm-svn: 64740
2009-02-17 05:01:10 +00:00
Ted Kremenek b535181199 Static Analyzer driver/options (partial) cleanup:
- Move all analyzer options logic to AnalysisConsumer.cpp.
- Unified specification of stores/constraints/output to be:
   -analyzer-output=...
   -analyzer-store=...
   -analyzer-constraints=...
  instead of -analyzer-range-constraints, -analyzer-store-basic, etc.
- Updated drivers (ccc-analyzer, scan-builds, new ccc) to obey this new
  interface
- Updated test cases to conform to new driver options

llvm-svn: 64737
2009-02-17 04:27:41 +00:00
Chris Lattner df52dc7a6f I didn't mean to change this.
llvm-svn: 63875
2009-02-05 19:05:56 +00:00
Chris Lattner 8181312251 fix some differences between apple gcc and clang on darwin/x86-32.
llvm-svn: 63846
2009-02-05 07:19:24 +00:00
Fariborz Jahanian 4193308b2a -x language fix.
Patch by David Chisnall

llvm-svn: 63686
2009-02-03 23:59:32 +00:00
Daniel Dunbar 506374cc59 ABITest: Makefile tweaks
llvm-svn: 63330
2009-01-29 20:36:50 +00:00
Daniel Dunbar d0c901c5a6 ABITest: Fix access to array test values.
llvm-svn: 63296
2009-01-29 08:48:06 +00:00
Daniel Dunbar 676fdd81d5 ABITest: Fix test value generation for unions.
llvm-svn: 63286
2009-01-29 07:36:46 +00:00
Daniel Dunbar 7bb8dfae53 Use xcc (instead of clang directly).
llvm-svn: 63279
2009-01-29 06:20:19 +00:00
Daniel Dunbar 36ccb30a35 ccc: Support -v; invent a version number for ccc for now, will be
shared with clang eventually.

llvm-svn: 63220
2009-01-28 19:26:20 +00:00
Daniel Dunbar 6ec8a4d9e3 ABITest: Support --test-layout option for generating
size/alignment/offsetof based tests of types instead of calling
convention tests.

llvm-svn: 63167
2009-01-28 02:01:23 +00:00
Ted Kremenek dd62885f40 Use string comparison rather than '=='.
llvm-svn: 63095
2009-01-27 05:34:28 +00:00
Ted Kremenek a3f462e49a PathDiagnostics:
- Add the distinction between the 'bug type' and the 'bug description'

HTMLDiagnostics:
- Output the bug type field as HTML comments

scan-build:
- Use the bug type field instead of the bug description for the HTML table.
- Radar filing now automatically picks up the bug description in the title (addresses <rdar://problem/6265970>)

llvm-svn: 63084
2009-01-27 01:53:39 +00:00
Ted Kremenek 725fb43012 Have 'Analyzer Failures' files be named to reflect the category of problem.
llvm-svn: 63080
2009-01-27 01:19:08 +00:00
Daniel Dunbar 827c763051 ABITestGen: Add generation of vector types.
llvm-svn: 63024
2009-01-26 19:05:20 +00:00
Daniel Dunbar ed4361ecbb Add simple make based harness for running ABI tests.
llvm-svn: 62916
2009-01-24 08:43:22 +00:00
Ted Kremenek ec28391084 Added clang option '--analyzer-display-progress' to indicate that the analyzer should output 'ANALYZE:' messages to display its progress on a source file.
llvm-svn: 62875
2009-01-23 20:52:26 +00:00
Daniel Dunbar 70e06bdbae Update CmpDriver to report missing commands.
llvm-svn: 62728
2009-01-21 23:34:23 +00:00
Ted Kremenek 13747167ca Static Analyzer: When generating plists for errors reports, generate one plist file per translation unit that contains all of the diagnostics.
llvm-svn: 62647
2009-01-21 00:42:24 +00:00
Daniel Dunbar 34fc92fdc2 Add -analyze action to run static analyzer, instead of inferring from
individual checker options.

llvm-svn: 62634
2009-01-20 23:17:32 +00:00
Daniel Dunbar 0c8d6c9d27 ccc: Darwin/x86: Add direct cpp support.
- Add Darwin_X86_CC1Tool which is shared by Darwin/x86/Compile and
   Darwin/x86/Preprocess tools.

 - Minor bug fixes (CmpDriver exit code, -x cpp-output handling, some
   linker argument translation).

llvm-svn: 62551
2009-01-20 00:47:24 +00:00
Daniel Dunbar 563dc04faa Return success indicator from CmpDriver.
llvm-svn: 62388
2009-01-17 00:50:45 +00:00
Daniel Dunbar 2e49bf2ceb Add utils/ABITest, my ABI test generation tool.
- Mostly written as an entertaining exercise in enumerating large or
   (countably, naturally) infinite sets. But hey, its useful too!

 - Idea is to number all C-types so that the N-th type can quickly be
   computed, with a good deal of flexibility about what types to
   include, and taking some care so that the (N+1)-th type is
   interestingly different from the N-th type. For example, using the
   default generator, the 1,000,000-th function type is:
--
typedef _Complex int T0;
typedef char T1 __attribute__ ((vector_size (4)));
typedef int T2 __attribute__ ((vector_size (4)));
T2 fn1000000(T0 arg0, signed long long arg1, T1 arg2, T0 arg3);
--
   and the 1,000,001-th type is:
--
typedef _Complex char T0;
typedef _Complex char T2;
typedef struct T1 { T2 field0; T2 field1; T2 field2; } T1;
typedef struct T3 {  } T3;
unsigned short fn1000001(T0 arg0, T1 arg1, T3 arg2);
--

   Computing the 10^1600-th type takes a little less than 1s. :)

llvm-svn: 62253
2009-01-15 04:24:17 +00:00
Daniel Dunbar 35926e10bd CmpDriver: Allow over-ride of drivers to compare through env variables
(DRIVER_[AB]).

llvm-svn: 62242
2009-01-14 20:06:04 +00:00
Daniel Dunbar c838568803 Add simple tool for comparing drivers (hardcoded to gcc and xcc) which
support -###.

llvm-svn: 62156
2009-01-13 07:38:29 +00:00
Daniel Dunbar 60e734782f Add utils/SummarizeErrors.
- Little script for scanning a compile log and summarizing warnings,
   errors, assertions, and crashes.
 - Is very slow, and stack trace regexs probably only work on Darwin.

llvm-svn: 62013
2009-01-09 22:39:43 +00:00
Daniel Dunbar 1b90e1cd17 ccc (old): Pass -arch through to assembler if given.
llvm-svn: 61833
2009-01-07 00:03:20 +00:00
Anders Carlsson e298a1775d Pass '-undefined- to the linker
llvm-svn: 61663
2009-01-05 01:24:39 +00:00
Anders Carlsson 091134785d Pass -fblocks to clang
llvm-svn: 61258
2008-12-19 20:56:23 +00:00
Ted Kremenek cd7cc1ec0b Properly "include" abs_path.
llvm-svn: 60502
2008-12-03 19:50:37 +00:00
Ted Kremenek 6cd08e42e4 Use abs_path to resolve symbolic links and '..' in report table.
llvm-svn: 60493
2008-12-03 19:19:23 +00:00
Ted Kremenek eda6c23984 Don't have special treatment from pruning the common suffices of files in /Developer, /usr, etc.
llvm-svn: 60491
2008-12-03 19:16:58 +00:00
Nuno Lopes 48b5a33826 llvm-ld doesnt support '-g', so aovid passing that opt to it
llvm-svn: 60428
2008-12-02 18:19:03 +00:00
Ted Kremenek 5a205a57d8 scan-build now recognizes when the user is directly invoking gcc for:
(a) different versions of gcc (e.g., a suffix '-4.2')
(b) different paths for gcc

llvm-svn: 59578
2008-11-19 01:46:21 +00:00
Daniel Dunbar ad90855730 Input files should be before link options.
- PR3094.
 - No test case, ccc is not really a supported product (llvmc2 already
   got this right).

llvm-svn: 59535
2008-11-18 17:38:30 +00:00
Ted Kremenek eefdcea2ba Fix use of uninitialized variable.
llvm-svn: 58663
2008-11-04 00:22:12 +00:00
Ted Kremenek 90230557d7 Allow user toggling between plist and html output with scan-build/ccc-analyzer.
llvm-svn: 58657
2008-11-04 00:02:53 +00:00
Ted Kremenek 3a5d515a82 Simplify the functions HtmlEsape and ShellEscape. We now properly print out the following command line in the HTML output: scan-build gcc -x c /dev/null -c -Dfoo='"string abc"'
Fixes <rdar://problem/6338651>

llvm-svn: 58600
2008-11-03 07:44:16 +00:00
Zhongxing Xu 72cf861fba Add defined in if().
llvm-svn: 58562
2008-11-02 10:58:16 +00:00
Ted Kremenek d15b2b1121 On Mac OS X, use TMPDIR as the default location to place analysis results. This is a more secure location for such files, and addresses <rdar://problem/6334220>.
llvm-svn: 58491
2008-10-31 05:48:42 +00:00
Daniel Dunbar 719781633a Update FindSpecRefs to recognize named section references.
- Unfortunately, I don't have an easy way to map from named sections
   to numbers nicely so they don't get page numbers or integrate in
   the list well.

llvm-svn: 58368
2008-10-29 05:58:09 +00:00
Ted Kremenek 2800afa640 Minor UI enhancement:
(1) when all of the bug category boxes are checked, automatically check "All Bugs"

(2) when any of the bug category boxes are unchecked, automatically uncheck "All Bugs"

llvm-svn: 58346
2008-10-28 20:09:57 +00:00
Ted Kremenek 99205241f4 Patch by Nikita Zhuk:
The attached patch adds a checkbox to the scan-build summary report, which toggles all other checkboxes' states.

llvm-svn: 58344
2008-10-28 19:56:52 +00:00
Zhongxing Xu ad4c3ded0d Add store option to scan-build and ccc-analyzer.
llvm-svn: 58248
2008-10-27 14:26:32 +00:00
Ted Kremenek 196922b4a1 Fix scan-build's processing of clang's analysis arguments. Patch by Nikita Zhuk!
llvm-svn: 58093
2008-10-24 15:11:58 +00:00
Chris Lattner 720d515ee9 Add support for assembler-with-cpp (preprocessed .S files), patch by
Roman Divacky!

llvm-svn: 57988
2008-10-22 17:29:21 +00:00
Ted Kremenek ad4a57d757 Add "argument key" processing similar to ccc.
llvm-svn: 57780
2008-10-19 06:42:38 +00:00
Daniel Dunbar 969e35610d ccc: Pass '-g' through to clang. Handle -weak_framework.
llvm-svn: 57779
2008-10-19 02:41:16 +00:00
Daniel Dunbar 5f68d4571b ccc: support -Xlinker
llvm-svn: 57613
2008-10-16 00:10:28 +00:00
Daniel Dunbar 76eae72a0c ccc: support -fsyntax-only, add some more darwin options, support
logging of actions.

llvm-svn: 57603
2008-10-15 21:52:00 +00:00