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

433 Коммитов

Автор SHA1 Сообщение Дата
Daniel Dunbar 6d52ca0d5c Add various other bits I use to run ABITest.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71201 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-08 00:49:21 +00:00
Daniel Dunbar 122ed24b4f Add to the house of cards that is ABITestGen.
- Support generating structures with bit-fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71192 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-07 23:19:55 +00:00
Ted Kremenek a4d8cde658 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70303 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-28 17:37:44 +00:00
Douglas Gregor 405bad0739 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26 22:20:50 +00:00
Douglas Gregor 69a6b6d7fc 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26 03:52:11 +00:00
Daniel Dunbar 259a565e3c Make this code a little more generic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26 01:28:51 +00:00
Daniel Dunbar 360d16c49d 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-23 05:03:44 +00:00
Ted Kremenek 32e9464afc ccc-analyzer: Don't create preprocessed files about the ignored 'cdecl' attribute. We know Clang doesn't support it yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69802 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22 13:42:27 +00:00
Daniel Dunbar 912f391851 Update this (non-default) test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-20 23:53:56 +00:00
Daniel Dunbar 6304201552 Remove CheckBuiltinMacros script, obsoleted since we support -dM now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 21:26:41 +00:00
Daniel Dunbar 8d33cd77dc 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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68815 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 19:52:24 +00:00
Daniel Dunbar 4d8076a0e4 Support %S in Python TestRunner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68814 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 19:49:21 +00:00
Daniel Dunbar 3bbc75302f 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-08 18:03:55 +00:00
Daniel Dunbar 7e075cb62c 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68513 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07 06:43:45 +00:00
Ted Kremenek 833da02356 scan-build: Also look for clang-cc in ../libexec
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67972 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-29 00:31:32 +00:00
Ted Kremenek 91ea79dd3f More path updates with clang-cc...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67609 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 05:30:14 +00:00
Ted Kremenek 318e6a65ff Update scan-build/ccc-analyzer to use 'clang-cc' instead of 'clang'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67608 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 04:29:13 +00:00
Ted Kremenek db51a55c49 '-o' option now supports relative paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 18:20:33 +00:00
Ted Kremenek 43b7bd31f9 scan-build: Also look for clang in the same directory as scan-build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66491 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 23:14:38 +00:00
Daniel Dunbar 6fc0bdfc32 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66293 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 22:20:40 +00:00
Daniel Dunbar 02ca6ea418 Add a little utility for interposing between a command line program
and capturing its invocations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66068 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 21:06:52 +00:00
Daniel Dunbar ec1abb9bd7 ABITestGen: Add v2i16 and v16f32 as default vector types to generate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65810 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 06:14:33 +00:00
Ted Kremenek 5de4092946 Don't report 'Parser Rejects' for conftest files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65619 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-27 06:17:38 +00:00
Ted Kremenek 6b89636db8 Correctly check for ccc-analyzer in the same directory as scan-build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-27 06:17:05 +00:00
Ted Kremenek 6c4312d170 Pass -ffreestanding' to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 23:09:43 +00:00
Ted Kremenek a2bdaf5322 For scan-build based analyses, use the '-analyzer-eargely-assume' setting by default (turning it on to test how it impacts users).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 17:36:31 +00:00
Ted Kremenek ce87b92970 scan-build now looks for ccc-analyzer first in the 'bin' subdirectory and then the directory where scan-build lives.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65483 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-25 22:54:02 +00:00
Ted Kremenek d76c6a38b8 Do not automatically run the 'missing -dealloc' check until we have adequate time to make it much smarter (too much noise).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65474 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-25 21:08:30 +00:00
Ted Kremenek 0e0eb8b051 Fix condition in ccc-analyzer that would cause the analyzer never to be run.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65417 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-25 00:10:37 +00:00
Ted Kremenek 8459132b03 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65390 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-24 22:07:12 +00:00
Daniel Dunbar ae66cf3153 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-24 07:42:32 +00:00
Ted Kremenek bf762c9b48 scan-build: Prune off any trailing '/' characters in the output directory path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65368 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-24 02:38:02 +00:00
Ted Kremenek 2d62ab1747 Find 'clang' in 'bin' subdirectory instead of 'cbin'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65343 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 23:01:06 +00:00
Daniel Dunbar 60ff8ce5b2 Goodbye old-ccc; please use tools/ccc/ccc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65335 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 19:17:09 +00:00
Daniel Dunbar 0f1730d220 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65263 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 04:17:53 +00:00
Ted Kremenek d4c7684f19 Update scan-build help diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65223 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-21 04:46:41 +00:00
Ted Kremenek 7e5bd6f061 Only create a preprocessed file for an ignored attribute if there currently does not exist an 'attribute_ignored_XXX.txt' file for that attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65222 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-21 04:46:20 +00:00
Ted Kremenek 9f4ecb34d5 Make 'RangeConstraintManager' the default ConstraintManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 21:49:22 +00:00
Ted Kremenek 8d10cdd9aa Fix potential use of uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65109 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 04:34:29 +00:00
Ted Kremenek d3794b8cc3 scan-build now searches for the clang binary in the subdirectory 'cbin'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 04:58:30 +00:00
Ted Kremenek 938eef139a 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".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64853 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 23:31:05 +00:00
Daniel Dunbar 9dd60b4526 ABITest: Add some checking of values for return types; useful for
catching internal consistency problems (esp. w/ reference compiler).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64847 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 23:13:43 +00:00
Daniel Dunbar 05104aa7b6 Note some more things to integrate into ABITest
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 23:12:22 +00:00
Ted Kremenek 3891a157cc Fix broken line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 05:01:10 +00:00
Ted Kremenek be1fe1eb12 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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64737 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 04:27:41 +00:00
Chris Lattner 399f5dd0c8 I didn't mean to change this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 19:05:56 +00:00
Chris Lattner d427ad4cce fix some differences between apple gcc and clang on darwin/x86-32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 07:19:24 +00:00
Fariborz Jahanian 9142bc962c -x language fix.
Patch by David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 23:59:32 +00:00
Daniel Dunbar 59ebd28462 ABITest: Makefile tweaks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63330 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29 20:36:50 +00:00
Daniel Dunbar e61e95fdcd ABITest: Fix access to array test values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63296 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29 08:48:06 +00:00
Daniel Dunbar 900ed55727 ABITest: Fix test value generation for unions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63286 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29 07:36:46 +00:00
Daniel Dunbar 107dc76180 Use xcc (instead of clang directly).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29 06:20:19 +00:00
Daniel Dunbar 76715913cd ccc: Support -v; invent a version number for ccc for now, will be
shared with clang eventually.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63220 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 19:26:20 +00:00
Daniel Dunbar 5ce61575ad ABITest: Support --test-layout option for generating
size/alignment/offsetof based tests of types instead of calling
convention tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 02:01:23 +00:00
Ted Kremenek 5f0e9325ad Use string comparison rather than '=='.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63095 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27 05:34:28 +00:00
Ted Kremenek a26ddabc0e 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>)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27 01:53:39 +00:00
Ted Kremenek 5daa3be1bf Have 'Analyzer Failures' files be named to reflect the category of problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63080 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27 01:19:08 +00:00
Daniel Dunbar 550faa3a6b ABITestGen: Add generation of vector types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63024 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-26 19:05:20 +00:00
Daniel Dunbar 6da02c6ad8 Add simple make based harness for running ABI tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-24 08:43:22 +00:00
Ted Kremenek 491918ee2f Added clang option '--analyzer-display-progress' to indicate that the analyzer should output 'ANALYZE:' messages to display its progress on a source file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-23 20:52:26 +00:00
Daniel Dunbar 163f31a019 Update CmpDriver to report missing commands.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62728 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 23:34:23 +00:00
Ted Kremenek ddf32dabe7 Static Analyzer: When generating plists for errors reports, generate one plist file per translation unit that contains all of the diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62647 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 00:42:24 +00:00
Daniel Dunbar d427023c33 Add -analyze action to run static analyzer, instead of inferring from
individual checker options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62634 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 23:17:32 +00:00
Daniel Dunbar 06172d6807 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).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62551 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 00:47:24 +00:00
Daniel Dunbar c97c05f849 Return success indicator from CmpDriver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62388 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 00:50:45 +00:00
Daniel Dunbar a83fb8647b 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. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62253 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 04:24:17 +00:00
Daniel Dunbar 2253dc4705 CmpDriver: Allow over-ride of drivers to compare through env variables
(DRIVER_[AB]).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62242 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 20:06:04 +00:00
Daniel Dunbar ab13061fe7 Add simple tool for comparing drivers (hardcoded to gcc and xcc) which
support -###.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 07:38:29 +00:00
Daniel Dunbar ef64fcfbfb 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 22:39:43 +00:00
Daniel Dunbar 91dce08a8e ccc (old): Pass -arch through to assembler if given.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61833 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 00:03:20 +00:00
Anders Carlsson e90b0acaa1 Pass '-undefined- to the linker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61663 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 01:24:39 +00:00
Anders Carlsson 06c58b191f Pass -fblocks to clang
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61258 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 20:56:23 +00:00
Ted Kremenek cd25c13ade Properly "include" abs_path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60502 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-03 19:50:37 +00:00
Ted Kremenek 990c2f45e5 Use abs_path to resolve symbolic links and '..' in report table.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60493 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-03 19:19:23 +00:00
Ted Kremenek d489d9cf9a Don't have special treatment from pruning the common suffices of files in /Developer, /usr, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60491 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-03 19:16:58 +00:00
Nuno Lopes a44c278924 llvm-ld doesnt support '-g', so aovid passing that opt to it
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60428 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 18:19:03 +00:00
Ted Kremenek 92548fed40 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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59578 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 01:46:21 +00:00
Daniel Dunbar 1b6ff6fdd1 Input files should be before link options.
- PR3094.
 - No test case, ccc is not really a supported product (llvmc2 already
   got this right).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59535 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 17:38:30 +00:00
Ted Kremenek 655aba727e Fix use of uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58663 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 00:22:12 +00:00
Ted Kremenek db4f5f2618 Allow user toggling between plist and html output with scan-build/ccc-analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 00:02:53 +00:00
Ted Kremenek 87f8de72a3 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>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58600 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 07:44:16 +00:00
Zhongxing Xu 3cab2b1c37 Add defined in if().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58562 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 10:58:16 +00:00
Ted Kremenek ffda0b44eb 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>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58491 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 05:48:42 +00:00
Daniel Dunbar 338bd0a160 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58368 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 05:58:09 +00:00
Ted Kremenek 999e120c1f 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"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58346 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 20:09:57 +00:00
Ted Kremenek 2350a46bec Patch by Nikita Zhuk:
The attached patch adds a checkbox to the scan-build summary report, which toggles all other checkboxes' states.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58344 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 19:56:52 +00:00
Zhongxing Xu 07c3767be5 Add store option to scan-build and ccc-analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58248 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 14:26:32 +00:00
Ted Kremenek ce1448bbbd Fix scan-build's processing of clang's analysis arguments. Patch by Nikita Zhuk!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58093 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 15:11:58 +00:00
Chris Lattner a778d7d973 Add support for assembler-with-cpp (preprocessed .S files), patch by
Roman Divacky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57988 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 17:29:21 +00:00
Ted Kremenek 89c4fcfd05 Add "argument key" processing similar to ccc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57780 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-19 06:42:38 +00:00
Daniel Dunbar fa538e724f ccc: Pass '-g' through to clang. Handle -weak_framework.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57779 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-19 02:41:16 +00:00
Daniel Dunbar dc914c876c ccc: support -Xlinker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57613 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:10:28 +00:00
Daniel Dunbar cb52925fec ccc: support -fsyntax-only, add some more darwin options, support
logging of actions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57603 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 21:52:00 +00:00
Ted Kremenek e15fa27364 Use 'realpath' to resolve the absolute path to clang and ccc-analyzer.
Add "-analyze-headers" option to scan-build that passes the option -analyzer-opt-analyze-headers to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57467 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 21:46:42 +00:00
Ted Kremenek 445fa776d2 Add missing newline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57333 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 00:17:08 +00:00
Daniel Dunbar 7b6d8c4269 Add script for checking builtin macros verse another compiler ($CC or
gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57133 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 20:39:30 +00:00
Daniel Dunbar 29471a1341 Bug fix, ccc was passing -std twice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56991 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 01:54:54 +00:00
Daniel Dunbar 8e45f73bae Fix ccc handling of -mmacosx-version-min.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56956 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-02 17:26:37 +00:00
Daniel Dunbar 1bf3f73598 ccc: Use CCC_NATIVE=1 by default.
- So far this works fairly well for me for building applications
   using clang as a gcc substitute. If you are using ccc for a
   different purpose and this is a problem, speak up! Note you can
   also use CCC_NATIVE=0 to disable.

 - Also, turn CCC_ECHO off as default.

 - Also, pass through -Wl, to linker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56904 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-01 01:10:22 +00:00
Ted Kremenek b10362acd9 Support -mmacosx-version-min
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56892 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 23:40:25 +00:00
Daniel Dunbar 319e792cf6 ccc: Add support for another batch of OS X linker options, including
-mmacosx-version-min.

One might anticipate that at some point I will just break down and go
through the man page. That seems a little too obvious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56890 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 22:54:22 +00:00
Daniel Dunbar 869f8b6053 ccc: Infer action type upfront.
- More straightforward, e.g. -E should always imply action =
   'preprocess' (I think).
 - Pass another option through for OS X.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56884 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 21:20:51 +00:00
Daniel Dunbar 7000bf8f87 Change ccc to not pass -x unknown down.
Pass through some more Mac OS X linker options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56853 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 16:18:31 +00:00
Ted Kremenek 47fc25f0c1 Really don't add -isysroot twice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56815 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 23:06:09 +00:00
Ted Kremenek e4f6952831 Don't filter out -fpascal-strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56810 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 22:45:28 +00:00
Ted Kremenek a30730e5cd Discard extra -isysroot options. This fixes:
<rdar://problem/6253141> Parser rejection occurs when command line has more than one -isysroot switch


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56790 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 16:15:20 +00:00
Ted Kremenek 81983111df Add "Path Length" back to the table of bug reports.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56765 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 04:13:09 +00:00
Ted Kremenek 27783eb8a0 Emulate gcc driver-driver functionality: run analyzer separately for each separate -arch option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56618 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 20:17:57 +00:00
Daniel Dunbar 7ebe0ed444 Add link to report analyzer failures (parse errors, asserts, etc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56606 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 06:05:31 +00:00
Daniel Dunbar ce723ce234 Update scan-build to add markers about crashes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56603 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 01:10:50 +00:00
Ted Kremenek c3998fa64e Include clang preprocessed sources as well with "crashes" output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56601 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 00:51:44 +00:00
Ted Kremenek 82a1253077 Use .txt extension for info files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56598 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 00:25:16 +00:00
Ted Kremenek f143545ce5 For generated index.html, look for "scan-view.css", not "/scan-view.css"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56510 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 22:34:51 +00:00
Ted Kremenek 2384dfa88e Yank out special CSS for button rendering (not very portable or well tested, and we were encountering race conditions with CSS loading).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56449 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 18:14:23 +00:00
Ted Kremenek db9e91b688 Reintegrate Daniel's changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56447 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 18:05:05 +00:00
Ted Kremenek 1d1abb1dec Add "SUMMARYENDHEAD" tag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56445 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 17:52:58 +00:00
Ted Kremenek 3ce1207f90 Don't embed CSS inside scan-build script; use external scanview.css.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56444 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 17:50:47 +00:00
Ted Kremenek 91639ef5aa Don't emit link to source file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56443 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 17:42:31 +00:00
Ted Kremenek 68005ddb49 Make "View Report" just a normal link again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56442 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 17:39:18 +00:00
Ted Kremenek 50534dc3ab Don't print out the path length.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56441 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 17:38:23 +00:00
Ted Kremenek 5950b3f93a Use scan-view to view reports. Opening index.html is deprecated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56431 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 06:47:01 +00:00
Ted Kremenek 7cba112624 Patch from Richard Godbee:
Improve scan-build results to include the user's host name, the working
directory of the analyzed project, and the date the analysis run took place.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56421 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 01:35:58 +00:00
Ted Kremenek 12a467ff0b Add webkit styles using Javascript (detect for AppleWebKit)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56408 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-21 20:10:46 +00:00
Ted Kremenek b315a3940f Unbreak using abs_path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56407 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-21 19:56:14 +00:00
Ted Kremenek 365680de8f Remove debugging message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56398 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-21 18:26:58 +00:00
Ted Kremenek 448b0f74c0 Unbreak ccc-analyzer: getcwd is from package Cwd
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56397 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-21 18:26:19 +00:00
Ted Kremenek 5f2825f6fa Patch by Richard Godbee:
Output to .info files the absolute paths to files that were rejected by the
parser or crashed the analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56396 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-21 18:04:49 +00:00
Ted Kremenek ebb7413bbe scan-build now prints out bug categories.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56395 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-21 06:58:09 +00:00
Ted Kremenek 3bf5ebe69f Have ScanView.py generate a "<td></td>" pair in the output HTML instead of having scan-build output an empty (and possibly unused) <td>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56393 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-21 03:55:51 +00:00
Daniel Dunbar e43038ec3d Add REPORTBUG marker to scan-build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56373 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-19 23:18:44 +00:00
Ted Kremenek 1672d335ad Analysis option -warn-objc-nserror-methods is no longer available. (check is done automatically with -checker-cfref)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56313 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 21:25:58 +00:00
Ted Kremenek 5d443490cd Enable '-warn-objc-nserror-methods' by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56298 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 06:34:16 +00:00
Ted Kremenek 9f9b1fded4 Include links to stderr output of clang in the table of files that clang rejects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56173 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 22:49:36 +00:00
Daniel Dunbar 75e0571497 Add ccc support for -e and -sectorder.
- llvmc2, save me!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56169 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 19:42:28 +00:00
Daniel Dunbar 71441f0e8a Teach FindSpecRefs how to link to C++ spec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56164 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 18:10:49 +00:00
Ted Kremenek 1346268d7f Echo stderr/stdout from clang subprocess to both the stderr of ccc-analyzer and
to an output file. This way users can both see the output of 'clang' as well as
enable background logging of files that clang encounters problems on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56130 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 23:05:26 +00:00
Ted Kremenek 20b2bae90c Bug fix: <rdar://problem/6164367>
scan-build now correctly processes path prefixes that contain multiple '+'
characters or other regex control characters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56121 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 21:15:10 +00:00
Ted Kremenek 0e6893840f Check if the environment variable TERM is defined before using it.
This fixes: <rdar://problem/6164279> scan-build gives error when invoked without TERM variable


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 18:17:51 +00:00
Ted Kremenek fc0898a652 Patch to scan-build by Jordan Breeding:
- Don't remove $BaseDir; may be unsafe
- Always create HTML directory with parents



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55813 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 23:56:36 +00:00
Daniel Dunbar 6aa9e8af34 Fix FindSpecRefs to be Python 2.4 compatible and get the SVN revision
in a more obvious fashion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55791 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 20:26:14 +00:00
Ted Kremenek 95aa1050cd scan-build:
- Only set the environment variable 'CXX' if the user specifies --use-c++.
- Fix regression when setting LDPLUSPLUS: add a 'which' to determine the location of g++.  This regression was pointed out by Jordan Breeding!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55780 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 17:52:41 +00:00
Ted Kremenek 01479d0e9f Capture 'uname' and 'gcc -v' output to .info files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55752 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 00:41:45 +00:00
Ted Kremenek 9a3c7dae00 ccc-analyzer:
- Capture the STDERR output of 'clang' to a file for use with crash reporting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 00:02:34 +00:00
Ted Kremenek 386c693166 Added --use-cxx option to scan-build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55706 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 17:59:35 +00:00
Nuno Lopes 24653e8010 recognise .s/.S file extensions. add default value for CCC_LANGUAGES
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55630 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 10:27:37 +00:00
Daniel Dunbar d3d814131b Improve ccc:
- Support environment variable CCC_LANGUAGES to control which
   languages clang is invoked on. If unset clang is invoked for all
   languages, otherwise CCC_LANGUAGES should be a comma separated list
   of the languages (as accepted by -x) for which clang should be
   invoked. Useful for only building C and Objective-C parts of a
   project with clang, for example.

 - Add environment variable CCC_FALLBACK. If set and non-empty then
   ccc will try and compile using the regular compiler if compilation
   with clang fails.

 - A few other tweaks to add options, flush stdout, recognize .mm as
   objective-c++, and infer languages for compile+link style
   invocations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55547 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-29 21:03:27 +00:00
Daniel Dunbar 33b511889b Add utils/FindSpecRefs, Python script for generating specification
references HTML page.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-29 01:07:08 +00:00
Ted Kremenek 6f12007499 Use explicit variable instead of $?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55501 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-28 21:28:55 +00:00
Ted Kremenek f1f17006b2 Enhance ubiviz to support vertex styles.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55462 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-28 05:01:37 +00:00
Ted Kremenek 710ad9343f Automatically execute ubiviz.
Cleanup ubigraph files when don't drawing the graphs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55459 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-28 03:54:51 +00:00
Ted Kremenek cb344d0f9b Fix regression: immediately terminate ccc-analyzer when gcc reports an error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55452 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-28 01:18:44 +00:00
Ted Kremenek f8ce6991f4 Added Ubigraph visualization for the static analyzer (this is pretty alpha quality).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55442 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27 22:31:43 +00:00
Ted Kremenek 948e06babd Remove regression where the analyzer was not called.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55440 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27 22:30:34 +00:00
Ted Kremenek d52e425226 Use path information from .info files when computing common prefix information.
This partially implements PR 2705: http://llvm.org/bugs/show_bug.cgi?id=2705


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55327 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 20:45:07 +00:00
Ted Kremenek 2ec5cd5535 Use the same 'cc' for generated preprocessed crash files as we do for compilation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55326 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 20:44:31 +00:00
Ted Kremenek 5a4ddaf39a ccc-analyzer now correctly reports the exit code from 'cc'.
scan-build now correctly reports the exit code from the build command.
Fixes: <rdar://problem/6172224>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55324 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 20:10:45 +00:00
Daniel Dunbar 4b5c4f27f3 Update ccc driver
- Use CCC_ECHO to control echoing behavior (default is on, set to ''
   or unset to disable)
 - Get 'clang','llc','as','cc','ld' executables from environment. 'cc'
   and 'ld' are fetched through CCC_CC and CCC_LD respectively -- to
   support make CC=ccc -- the others are through their upcased
   versions.
 - Add CCC_NATIVE mode.
   o This uses llc and as to generate native object files; allowing
     more drop-in replacement of gcc.
   o Disabled by default, but should eventually be default.
   o Allow --emit-llvm in CCC_NATIVE mode to override. Essentially
     this makes ccc more like a drop in replacement for llvm-gcc.
 - Prevent explicit -x <language> options from annoying clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55260 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 22:15:15 +00:00
Ted Kremenek f17ef3caf1 Added --use-cc option to scan-build to allow the user to specify what compiler they want to use for code compilation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55142 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 21:47:09 +00:00
Ted Kremenek 2dd7ad13bb Record arguments in .info file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54947 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-18 20:55:25 +00:00
Ted Kremenek 5d31f83bbe scan-build/ccc-analyzer now also report clang parser failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54931 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-18 18:38:29 +00:00
Nuno Lopes c46cf49229 fix linking with .so files specified in cmd line (this fixes some libtool usages)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54623 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 22:17:57 +00:00
Nuno Lopes 9a1844866b pass -R arg to linker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54622 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 21:58:01 +00:00
Ted Kremenek 991c54b9b7 Have scan-build/ccc-analyzer generate preprocessed .i/.mi files for sources that clang crashes on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54552 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-08 20:46:42 +00:00
Ted Kremenek 29da6c59df Fix by Jordan Breeding: when scanning for prior runs, scan-build should ignore files that are not directories.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54473 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 17:57:34 +00:00
Ted Kremenek fc1d340169 Misc cleanups.
When results go to a auto-generated dir in /tmp, don't use randomized file names.  Just output /tmp/scan-build-DATE-counter, where counter is an auto-incremented counter for runs produced that day.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54325 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-04 18:15:26 +00:00
Ted Kremenek 63c2017737 Convert remaining "open" calls to use three-argument form (thanks to Sam Bishop for the tip!).
Recognize 'ccc-analyzer' as a build command some users may use.  Treat it just like calling gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54323 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-04 17:34:06 +00:00
Ted Kremenek 5b08cbc9cb Use stable sort.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54222 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 18:03:31 +00:00
Ted Kremenek 3cea9ee6b7 "Escape" bug names with quotes for selecting/deselecting from the bug table.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54220 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 17:58:08 +00:00
Ted Kremenek bde3a05193 Enabled 'unused ivars' check by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54052 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:35:01 +00:00
Ted Kremenek 940260996d Ignore -MT and -MF.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53977 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 03:52:21 +00:00
Ted Kremenek 1683360500 "This patch adds paths for Fedora 9 in clang.cpp and support for two preprocessor options in ccc."
Patch by Zhongxing Xu!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53976 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 03:49:15 +00:00
Ted Kremenek fbeeca84dd Reimplement ccc-analyzer in a language I actually know, and implement some obvious optimizations when processing command line arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53783 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 06:11:04 +00:00
Ted Kremenek 2be1853a09 Remove typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53776 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 23:13:03 +00:00
Ted Kremenek a3ed36afa9 Quote invocation of clang in pipe to handle paths with spaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53775 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 23:11:33 +00:00
Ted Kremenek 9012599f4c Have scan-build control default analyses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53654 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 23:41:32 +00:00
Ted Kremenek ef42ca26ec Add -DIBOutlet=__attribute__((iboutlet)) to analyzer arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53648 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 23:09:14 +00:00
Ted Kremenek 363dc3f40f Added --status-bugs option to scan-build. By default, the exit status of
scan-build is the same as the exit status of the executed build command. With
this option, the exit status of scan-build is 1 if the analyzer flagged any
bugs, and 0 otherwise.

This addresses: <rdar://problem/6075320>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53642 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 22:03:09 +00:00
Ted Kremenek 20161e9ed7 Per Sam Bishop's excellent suggestion, use "system" instead of backticks to invoke sub-commands used by scan-build. This avoids meta-character translation issues caused by a shell subprocess.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53640 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 20:18:21 +00:00
Ted Kremenek e0787814a7 Quote file names to better handle paths with spaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53635 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 18:28:16 +00:00
Ted Kremenek 5656a98557 scan-build now propagates up the exit status of the build command.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53620 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 17:09:28 +00:00
Ted Kremenek 24ec065270 Do not enable -warn-objc-missing-dealloc by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53619 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 17:06:44 +00:00
Ted Kremenek b7770c0b49 scan-build now interrogates clang for a list of available analyses, and presents
these as options to the user of scan-build.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53618 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 17:06:13 +00:00
Ted Kremenek 57bb37fcf5 Re-enable missing -dealloc check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53578 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-14 23:56:31 +00:00
Ted Kremenek 003798181c Using new clang option to invoke the type-signature check of Objective-C instance methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53576 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-14 23:41:49 +00:00
Ted Kremenek 5b10bd7e83 Run by default: -check-objc-methodsigs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53483 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11 22:41:43 +00:00
Ted Kremenek 150c2120ab scan-build now also prints the HTML directory reports were emitted to at the end of the build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53466 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11 19:15:05 +00:00
Ted Kremenek 88a96d6c3f Mark the "Bug Type" column as being initially sorted (display the sort ding) so that users can readily see that the table can be sorted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53176 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 17:23:32 +00:00
Ted Kremenek 2645c77072 Output html should have 'class=' before "sorttable_nosort".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53175 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 16:58:44 +00:00
Nuno Lopes 05f971a432 llvm-ld doesnt support -O1, -O2, etc options, so dont pass them
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53144 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-05 17:31:10 +00:00
Ted Kremenek 1c6f3b274c Have ccc-analyzer skip any files with an unknown (or absent) extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53114 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03 22:24:10 +00:00
Ted Kremenek 01006786e3 ccc-analyzer now dispatches the options "-checker-cfref" and "-warn-dead-stores" to clang instead of just "-checker-cfref".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53053 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-02 23:16:10 +00:00
Ted Kremenek 3301cb103d When inspecting the build command, strip off the preceding path to the build command.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52913 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 18:18:16 +00:00
Ted Kremenek 2797b1731a Bug fix: when copying prefix files using 'cp', don't split file names by spaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52899 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 16:12:30 +00:00
Chris Lattner cf719b7829 "This maps the -pthread option to -lpthread - this isn't 100% correct,
since handling this correctly is quite complex, and on some platforms  
requires additional -D options and on some implies linking against a  
different libc, but this works better than just ignoring the option.

The other change passes the -x option across to clang, which allows  
compiling .c files as Objective-C and so on.  For some reason a lot of  
configure scripts seem to be under the misguided impression that this  
is a sensible thing to do."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52579 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-21 17:46:11 +00:00
Nuno Lopes e5d12e8003 handle -arch and -isysroot correctly (like ccc-analyszer do).
Patch by Filipe Cabecinhas

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52417 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 17:23:14 +00:00
Ted Kremenek f2f8d6c471 Only use colored output when the environment variable SCAN_BUILD_COLOR is set.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52379 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 03:06:59 +00:00
Ted Kremenek 23cfca3760 Remove debugging message in ccc-analyzer.
Add color diagnostics from scan-build, and indicate the number of bugs found (if any).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52372 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-16 22:40:14 +00:00
Ted Kremenek 6814447ddd Re-enable the analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-16 21:41:07 +00:00
Ted Kremenek cd85348a93 Skip a few more files and linker options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52189 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-10 18:56:59 +00:00
Ted Kremenek fe4db8b834 Ignore a few more linker arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52023 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-05 22:46:24 +00:00