Commit Graph

110 Commits

Author SHA1 Message Date
Ted Kremenek 9f2ee2bb26 Use 'eq' operator, and enable regular experimental checks when --experimental-checks is passed to scan-build.
llvm-svn: 88673
2009-11-13 18:49:48 +00:00
Ted Kremenek 4ef13f8ac9 Add clang-cc option "--analyzer-experimental-internal-checks". This
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.

llvm-svn: 88671
2009-11-13 18:46:29 +00:00
Ted Kremenek 05e6f5b6e9 Turn on 'RegionStore' as the default store manager both for 'clang --analyze' and 'scan-build'. Leave 'BasicStore' as the default store manager in 'clang-cc'. While there are still known warts with RegionStore, it's ready to be tested by general users.
llvm-svn: 82752
2009-09-25 05:55:59 +00:00
Ted Kremenek d0d7256b8f Pass '-Wno-' options to clang-cc. This fixes <rdar://problem/6943988>.
llvm-svn: 79011
2009-08-14 18:20:50 +00:00
Ted Kremenek ba8d7fc6bf Recognize '-M' and '-MM' options.
llvm-svn: 78027
2009-08-04 00:57:12 +00:00
Ted Kremenek 90fc8a492e 'unlink' file directly instead of invoking system shell.
llvm-svn: 78026
2009-08-04 00:55:59 +00:00
Ted Kremenek 7ac29bb2d8 Include '-o' arguments in verbose output.
llvm-svn: 77881
2009-08-02 05:42:46 +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
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
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 25421bb8f6 Use Text::ParseWords to make 'clang -###' parsing more robust.
llvm-svn: 71504
2009-05-11 23:29:51 +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
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
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 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
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 078b8879e7 Don't report 'Parser Rejects' for conftest files.
llvm-svn: 65619
2009-02-27 06:17:38 +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 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
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 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
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
Ted Kremenek dd62885f40 Use string comparison rather than '=='.
llvm-svn: 63095
2009-01-27 05:34:28 +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
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
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
Anders Carlsson 091134785d Pass -fblocks to clang
llvm-svn: 61258
2008-12-19 20:56:23 +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
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 ad4a57d757 Add "argument key" processing similar to ccc.
llvm-svn: 57780
2008-10-19 06:42:38 +00:00
Ted Kremenek e8450fefdd Support -mmacosx-version-min
llvm-svn: 56892
2008-09-30 23:40:25 +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 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
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 23432d4c7b Unbreak using abs_path.
llvm-svn: 56407
2008-09-21 19:56:14 +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 907921f753 Include links to stderr output of clang in the table of files that clang rejects.
llvm-svn: 56173
2008-09-12 22:49:36 +00:00
Ted Kremenek 4ab81cbe2f 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.

llvm-svn: 56130
2008-09-11 23:05:26 +00:00