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

107 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek 0895937d2c Pass '-Wno-' options to clang-cc. This fixes <rdar://problem/6943988>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:20:50 +00:00
Ted Kremenek d732a7b771 Recognize '-M' and '-MM' options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-04 00:57:12 +00:00
Ted Kremenek e3bf8a8ab4 'unlink' file directly instead of invoking system shell.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78026 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-04 00:55:59 +00:00
Ted Kremenek 63fe5ecfd1 Include '-o' arguments in verbose output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77881 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 05:42:46 +00:00
Ted Kremenek e600bedcfe Add scan-build option '-no-failure-reports' to supress the creation of a 'failures' subdirectory that includes crash reports, preprocessed files, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77644 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:55:19 +00:00
Ted Kremenek 3386c8a510 Only generate preprocessed files during crashes using Clang, not GCC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 00:14:21 +00:00
Ted Kremenek 7753b35236 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77263 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 22:10:34 +00:00
Ted Kremenek 9a9e0d41e2 Re-enable passing analyzer options from scan-build to ccc-analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-15 04:20:31 +00:00
Ted Kremenek 621cc4ebcc Don't strip quotes in compiler line for -D arguments.
Fixes PR 4205.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-15 04:07:18 +00:00
Ted Kremenek 1df35e310d Use Text::ParseWords to make 'clang -###' parsing more robust.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-11 23:29:51 +00:00
Ted Kremenek efaf1915d5 ccc-analyzer should only analyze C and Objective-C files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71474 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-11 21:08:34 +00:00
Ted Kremenek fd9df0eddd 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71364 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-09 19:19:28 +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
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 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
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 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 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 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
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 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
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
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 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
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
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
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 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
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 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
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
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 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
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 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 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 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
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 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 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