Chris Lattner
552b52f49d
"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!
llvm-svn: 52579
2008-06-21 17:46:11 +00:00
Nuno Lopes
a02e2f991b
handle -arch and -isysroot correctly (like ccc-analyszer do).
...
Patch by Filipe Cabecinhas
llvm-svn: 52417
2008-06-17 17:23:14 +00:00
Ted Kremenek
3dd7724711
Only use colored output when the environment variable SCAN_BUILD_COLOR is set.
...
llvm-svn: 52379
2008-06-17 03:06:59 +00:00
Ted Kremenek
51ca6fa512
Remove debugging message in ccc-analyzer.
...
Add color diagnostics from scan-build, and indicate the number of bugs found (if any).
llvm-svn: 52372
2008-06-16 22:40:14 +00:00
Ted Kremenek
c17ec3e27f
Re-enable the analyzer.
...
llvm-svn: 52367
2008-06-16 21:41:07 +00:00
Ted Kremenek
2f7a88ddf6
Skip a few more files and linker options.
...
llvm-svn: 52189
2008-06-10 18:56:59 +00:00
Ted Kremenek
dfa8c8aef5
Ignore a few more linker arguments.
...
llvm-svn: 52023
2008-06-05 22:46:24 +00:00
Ted Kremenek
6da61be501
ccc-analyzer now properly eats the -install_name, -exported_symbols_list, -current_version, -compatibility_version, and -sectorder command line arguments.
...
llvm-svn: 51965
2008-06-04 20:49:03 +00:00
Ted Kremenek
88bfb62ffe
Use the correct 'ccc-analyzer' when the build command is a direct invocation of gcc.
...
llvm-svn: 51883
2008-06-02 21:52:47 +00:00
Ted Kremenek
7ccc9835ef
Use "file_language" for per-language -x options.
...
llvm-svn: 51871
2008-06-02 17:13:40 +00:00
Ted Kremenek
ffdbeefc54
When the build command is xcodebuild, set the magical environment variable LDPLUSPLUS to g++ to ensure that C++ object files are linked with g++ instead of gcc.
...
llvm-svn: 51621
2008-05-27 23:18:07 +00:00
Ted Kremenek
f9671ecbfd
Correctly check to see if we are analyzing C++ files (skip).
...
llvm-svn: 51620
2008-05-27 23:17:16 +00:00
Ted Kremenek
e37e612e7a
Fix variable misspelling.
...
llvm-svn: 51548
2008-05-24 16:16:30 +00:00
Ted Kremenek
37d6f58018
Don't use inferlanguage to override the default language for all files.
...
llvm-svn: 51547
2008-05-24 16:14:34 +00:00
Ted Kremenek
55842bd269
Don't analyze .o files.
...
llvm-svn: 51546
2008-05-24 16:09:00 +00:00
Ted Kremenek
f18f460716
Cleanup indentation and remove some dead code.
...
Analyze files not compiled using "-c". This fixes:
<rdar://problem/5961638> invoke checker when gcc is not called with "-c"
llvm-svn: 51545
2008-05-24 15:58:54 +00:00
Ted Kremenek
567f333f23
Disable the use of PCH files when using xcodebuild.
...
llvm-svn: 51509
2008-05-23 22:18:16 +00:00
Ted Kremenek
a4951b7796
When known, include the analyzer build in the output of scan-build.
...
llvm-svn: 51492
2008-05-23 18:17:05 +00:00
Ted Kremenek
1907394f74
Don't specify a -o option to clang when not using "-checker-cfref".
...
llvm-svn: 51124
2008-05-14 20:26:52 +00:00
Ted Kremenek
e0927a0f49
Fix variable misspelling.
...
llvm-svn: 51122
2008-05-14 20:20:46 +00:00
Ted Kremenek
cf05a830b1
Don't run clang on .s files.
...
llvm-svn: 51121
2008-05-14 20:17:17 +00:00
Ted Kremenek
e3fc13a3e0
Added "-a" option to scan-build to select the analysis (ASTConsumer) used by clang. The default is -checker-cfref.
...
llvm-svn: 51116
2008-05-14 20:10:33 +00:00
Ted Kremenek
0a8a0fa0b5
Zero-pad the month and day fields in the output HTML directory.
...
llvm-svn: 51109
2008-05-14 17:23:56 +00:00
Ted Kremenek
20a44ed730
Output #LINE for computing line counts.
...
llvm-svn: 51079
2008-05-13 22:56:36 +00:00
Ted Kremenek
7147584d03
Use "-i" option with make when ignoring errors.
...
llvm-svn: 51070
2008-05-13 21:28:02 +00:00
Ted Kremenek
52387a1828
Re-enable the analyzer.
...
llvm-svn: 51055
2008-05-13 17:10:28 +00:00
Ted Kremenek
80ff5f0696
Place "-x" option before other analyzer options.
...
llvm-svn: 51014
2008-05-12 23:56:50 +00:00
Ted Kremenek
ece302d75b
Directly invoke gcc immediately instead of before we process the command line arguments.
...
llvm-svn: 51012
2008-05-12 23:47:41 +00:00
Ted Kremenek
f5a94e7114
Added internal command logging.
...
llvm-svn: 51003
2008-05-12 22:07:14 +00:00
Ted Kremenek
b95635e6ec
Fix a few glitches in scan-build with automatically generating class names from bug types.
...
llvm-svn: 50784
2008-05-06 23:51:45 +00:00
Ted Kremenek
10427bdbb9
Experiment with not converting bug names to lower case.
...
llvm-svn: 50753
2008-05-06 18:11:36 +00:00
Ted Kremenek
1108d6eef3
Remove debugging statement.
...
llvm-svn: 50598
2008-05-02 23:40:49 +00:00
Ted Kremenek
5f56cbbf7d
Output better paths to display in bug reports and compute a common
...
prefix for all files.
llvm-svn: 50592
2008-05-02 22:04:53 +00:00
Ted Kremenek
4f3d7cd12e
Add missing "-" that prefix arguments to forward to clang.
...
llvm-svn: 50540
2008-05-01 21:26:22 +00:00
Ted Kremenek
0ae9ed7fab
scan-build: Disable distributed builds for xcodebuild
...
llvm-svn: 50506
2008-04-30 23:47:12 +00:00
Ted Kremenek
a8197366db
Pass fobjc-gc-only and fobjc-gc options down to clang.
...
llvm-svn: 50426
2008-04-29 16:24:23 +00:00
Ted Kremenek
e5aa10cec4
Pass down more -iXXX options that clang supports
...
llvm-svn: 50304
2008-04-25 21:28:20 +00:00
Nate Begeman
f0168bd208
Don't double-increment counter for -arch and -isysroot
...
llvm-svn: 50082
2008-04-22 04:47:32 +00:00
Ted Kremenek
405cf2daf9
Remove unused "verbose" argument to compile(). Also unbreaks ccc-analyzer.
...
llvm-svn: 50066
2008-04-21 21:58:05 +00:00
Ted Kremenek
74a58d780a
Pass "-arch" down to clang.
...
llvm-svn: 50056
2008-04-21 20:28:01 +00:00
Ted Kremenek
31d2176d1e
Pass "-isysroot" option down to clang.
...
llvm-svn: 49956
2008-04-19 18:42:26 +00:00
Ted Kremenek
6267835f57
Fix spelling/grammar in comment.
...
llvm-svn: 49955
2008-04-19 18:07:44 +00:00
Ted Kremenek
b0fa31cefb
Use Digest::MD5 (a Perl module that should come bundled standard with Perl) to compute file digests instead of using the external program "sha1sum" (which may not be present).
...
llvm-svn: 49954
2008-04-19 18:05:48 +00:00
Ted Kremenek
cf9e9c5554
Use 'clang' binary in the same dir as scan-build; if it isn't there use the one in the path
...
llvm-svn: 49933
2008-04-18 22:00:56 +00:00
Ted Kremenek
8886b3021e
Turn on CF reference count checker.
...
llvm-svn: 49931
2008-04-18 21:53:01 +00:00
Ted Kremenek
532ba14fdb
Spelling fix.
...
llvm-svn: 49908
2008-04-18 16:58:34 +00:00
Ted Kremenek
b06817e914
scan-build now fixes permissions of report files and directories, which may
...
be created as "temporary files" that are not world readable.
llvm-svn: 49904
2008-04-18 15:18:20 +00:00
Ted Kremenek
4bf02a0856
Compute a digest of each report file, and nuke reports that have the same
...
digest as a file already added to the index. This a workaround for the
analyzer analyzing the same file more than once, which can happen when building
multiple targets.
llvm-svn: 49903
2008-04-18 15:09:30 +00:00
Ted Kremenek
43445b3081
Added "summary table" to generated index.html page that allows one to
...
toggle which bug reports are displayed in the report table.
llvm-svn: 49738
2008-04-15 20:47:02 +00:00
Ted Kremenek
969bb805f9
Used --checker-simple.
...
llvm-svn: 49501
2008-04-10 22:17:23 +00:00