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
Ted Kremenek
d323ccd29c
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.
llvm-svn: 57467
2008-10-13 21:46:42 +00:00
Ted Kremenek
63cfae34fd
Add missing newline.
...
llvm-svn: 57333
2008-10-10 00:17:08 +00:00
Daniel Dunbar
6ba6cc42d4
Add script for checking builtin macros verse another compiler ($CC or
...
gcc).
llvm-svn: 57133
2008-10-05 20:39:30 +00:00
Daniel Dunbar
438b0c0c03
Bug fix, ccc was passing -std twice.
...
llvm-svn: 56991
2008-10-03 01:54:54 +00:00
Daniel Dunbar
92c4c4af58
Fix ccc handling of -mmacosx-version-min.
...
llvm-svn: 56956
2008-10-02 17:26:37 +00:00
Daniel Dunbar
e8813812eb
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.
llvm-svn: 56904
2008-10-01 01:10:22 +00:00
Ted Kremenek
e8450fefdd
Support -mmacosx-version-min
...
llvm-svn: 56892
2008-09-30 23:40:25 +00:00
Daniel Dunbar
969b48cba1
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.
llvm-svn: 56890
2008-09-30 22:54:22 +00:00
Daniel Dunbar
123e7d1c2a
ccc: Infer action type upfront.
...
- More straightforward, e.g. -E should always imply action =
'preprocess' (I think).
- Pass another option through for OS X.
llvm-svn: 56884
2008-09-30 21:20:51 +00:00
Daniel Dunbar
64fd24812a
Change ccc to not pass -x unknown down.
...
Pass through some more Mac OS X linker options.
llvm-svn: 56853
2008-09-30 16:18:31 +00:00
Ted Kremenek
887c49d592
Really don't add -isysroot twice.
...
llvm-svn: 56815
2008-09-29 23:06:09 +00:00
Ted Kremenek
6b2e07a292
Don't filter out -fpascal-strings.
...
llvm-svn: 56810
2008-09-29 22:45:28 +00:00
Ted Kremenek
8b89a65136
Discard extra -isysroot options. This fixes:
...
<rdar://problem/6253141> Parser rejection occurs when command line has more than one -isysroot switch
llvm-svn: 56790
2008-09-29 16:15:20 +00:00
Ted Kremenek
7dbc92a269
Add "Path Length" back to the table of bug reports.
...
llvm-svn: 56765
2008-09-28 04:13:09 +00:00
Ted Kremenek
15146a56e1
Emulate gcc driver-driver functionality: run analyzer separately for each separate -arch option.
...
llvm-svn: 56618
2008-09-25 20:17:57 +00:00
Daniel Dunbar
0dbad4670c
Add link to report analyzer failures (parse errors, asserts, etc).
...
llvm-svn: 56606
2008-09-25 06:05:31 +00:00
Daniel Dunbar
1ac2ccb47e
Update scan-build to add markers about crashes.
...
llvm-svn: 56603
2008-09-25 01:10:50 +00:00
Ted Kremenek
72e4b0b54c
Include clang preprocessed sources as well with "crashes" output.
...
llvm-svn: 56601
2008-09-25 00:51:44 +00:00
Ted Kremenek
1ad3b3df2f
Use .txt extension for info files.
...
llvm-svn: 56598
2008-09-25 00:25:16 +00:00
Ted Kremenek
ba79e17139
For generated index.html, look for "scan-view.css", not "/scan-view.css"
...
llvm-svn: 56510
2008-09-23 22:34:51 +00:00
Ted Kremenek
0ed9c35b0e
Yank out special CSS for button rendering (not very portable or well tested, and we were encountering race conditions with CSS loading).
...
llvm-svn: 56449
2008-09-22 18:14:23 +00:00
Ted Kremenek
9b5ba60ff3
Reintegrate Daniel's changes.
...
llvm-svn: 56447
2008-09-22 18:05:05 +00:00
Ted Kremenek
85ea56ea84
Add "SUMMARYENDHEAD" tag.
...
llvm-svn: 56445
2008-09-22 17:52:58 +00:00
Ted Kremenek
620ca3d3c9
Don't embed CSS inside scan-build script; use external scanview.css.
...
llvm-svn: 56444
2008-09-22 17:50:47 +00:00
Ted Kremenek
8775b12c36
Don't emit link to source file.
...
llvm-svn: 56443
2008-09-22 17:42:31 +00:00
Ted Kremenek
2a56b23c3a
Make "View Report" just a normal link again.
...
llvm-svn: 56442
2008-09-22 17:39:18 +00:00
Ted Kremenek
a026fd3c01
Don't print out the path length.
...
llvm-svn: 56441
2008-09-22 17:38:23 +00:00
Ted Kremenek
a3fe93b688
Use scan-view to view reports. Opening index.html is deprecated.
...
llvm-svn: 56431
2008-09-22 06:47:01 +00:00
Ted Kremenek
d01c408b71
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.
llvm-svn: 56421
2008-09-22 01:35:58 +00:00
Ted Kremenek
0b7ae724a7
Add webkit styles using Javascript (detect for AppleWebKit)
...
llvm-svn: 56408
2008-09-21 20:10:46 +00:00
Ted Kremenek
23432d4c7b
Unbreak using abs_path.
...
llvm-svn: 56407
2008-09-21 19:56:14 +00:00
Ted Kremenek
9eca6af2f2
Remove debugging message.
...
llvm-svn: 56398
2008-09-21 18:26:58 +00:00
Ted Kremenek
ca8ac081af
Unbreak ccc-analyzer: getcwd is from package Cwd
...
llvm-svn: 56397
2008-09-21 18:26:19 +00:00
Ted Kremenek
32c1181468
Patch by Richard Godbee:
...
Output to .info files the absolute paths to files that were rejected by the
parser or crashed the analyzer.
llvm-svn: 56396
2008-09-21 18:04:49 +00:00
Ted Kremenek
172f04dfe6
scan-build now prints out bug categories.
...
llvm-svn: 56395
2008-09-21 06:58:09 +00:00
Ted Kremenek
ebb4245b84
Have ScanView.py generate a "<td></td>" pair in the output HTML instead of having scan-build output an empty (and possibly unused) <td>.
...
llvm-svn: 56393
2008-09-21 03:55:51 +00:00
Daniel Dunbar
669632bf9a
Add REPORTBUG marker to scan-build.
...
llvm-svn: 56373
2008-09-19 23:18:44 +00:00
Ted Kremenek
6633871cb3
Analysis option -warn-objc-nserror-methods is no longer available. (check is done automatically with -checker-cfref)
...
llvm-svn: 56313
2008-09-18 21:25:58 +00:00